Excel copy paste value different worksheets -
in sheet1 want copy values of columns a,c,d,g , paste bottom of sheet2 in columns a,b,c,d
i've been having difficultly because columns of a,c,d,g contain formulas when use copy/destination method ends breaking macro.
i can think of 3 methods, , use copy/paste
use method rwtwm suggested. example code be
sheets("sheet1").range("a1:a10").copy sheets("sheet2").range("a1").pastespecial paste:=xlpastevalues, _ operation:=xlnone, skipblanks:=false, transpose:=false
copy values
sheets("sheet2").range("a1:a10").value = _ sheets("sheet1").range("a1:a10").value
copy data array, , use copy array other sheet
dim mydata mydata = sheets("sheet1").range("a1:a10") sheets("sheet2").range("a1:a10") = mydata
Comments
Post a Comment