vba - How to select multiple cells and copypaste to another sheet? -


i want select multiple cells , after selecting multiple cells,i want copy , past values in other sheet.

my code this:

union(range("c4,c5,i4,i5,j7"), range("c4, c5, i4, i5, j7")).select

selection.copy

code selecting cells, whiles going "selection. copy" arguments gives run time error '1004' "that command cannot used on multiple selections."

can me fix this?

i 1 piece @ time:

sub disjoint()   dim rng range, r range, addy string   set rng = sheets("sheet1").range("a1,b3,c5,d7,e11")   each r in rng     addy = r.address     r.copy sheets("sheet2").range(addy)   next r end sub 

Comments

Popular posts from this blog

javascript - three.js lot of meshes optimization -

smartface.io - Proper way to change color scheme for whole application -

Email notification in google apps script -