excel - Basic copy and paste Macro -
i basic excel. have tried making macro basic task can't seem figure out, can please!
i want copy word in front of numerous titles in separate cells , add data adjacent cell end. example
a1 - happy birthday a-2 wc367 b1 - congratulations b-2 wc675 c1 - luck c-2 wc542
etc etc.
now want add supplier name (wood) in front of these titles , copy data fro a-2,b-2,c-2 onto end of title.
they should end looking this:
a-1 wood happy birthday wc367 b-1 wood congratulations wc675 c-1 wood luck wc542
i have tried making marco copies data macro made each 1 rather using data relevant cells. have ended having copy , paste code each 1 , adding symbol @ beginning , doing find , replace seems long winded.
you can type in a3 = concatenate("wood ",a1," ",a2)
, drag formula right.
or following code:
sub macro() dim lastcol long lastcol = range("a1").end(xltoright).column range(cells(3, 1), cells(3, lastcol)).value = "=concatenate(""wood "",r[-2]c,"" "",r[-1]c)" range(cells(1, 1), cells(1, lastcol)).value = range(cells(3, 1), cells(3, lastcol)).value range(cells(2, 1), cells(3, lastcol)).clearcontents end sub
Comments
Post a Comment