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

  1. 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 
  2. copy values

    sheets("sheet2").range("a1:a10").value = _     sheets("sheet1").range("a1:a10").value 
  3. copy data array, , use copy array other sheet

    dim mydata mydata = sheets("sheet1").range("a1:a10") sheets("sheet2").range("a1:a10") = mydata 

Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -