excel - macro to extract specific column from multiple worksheet in one sheet -
i copy specific column like(name, dob, dod, address, salary) form multiple sheet in one. have written below code working colums want specific column in "combined sheet"
sub combinesheet() dim j integer on error resume next sheets(1).select sheets(comb_sheet).name = "combined" sheets(2).activate range("a1").entirerow.select selection.copy destination:=sheets(1).range("a1") j = 2 sheets.count sheets(j).activate range("a1").select selection.currentregion.select selection.offset(1, 0).resize(selection.rows.count - 1).select selection.copy destination:=sheets(1).range("a65536").end(xlup)(2) next sheets(1).select sheets(comb_sheet).name = "combined" columns("a:z").select selection.entirecolumn.autofit application.screenupdating = false end sub
Comments
Post a Comment