Macro code

R

richzip

How can I set up a macro code to do the following:

If a specific value is found in Column A (say: SBY), then column C should
be set to equal whatever value is found in Column B (this value could be
several different things).

Thank you!
 
S

Simon Lloyd

Not tested just written here but should do what you want it to do!

Sub Copy_B_To_C()
Dim Rng As Range, MyCell as range
Set rng= Range("A1:A" & range("A" & rows.count).end(xlup).row)
for each mycell in rng
if mycell.value ="SBY" then
mycell.offset(0,3)=mycell.offset(0,2)
end if
next mycell
end sub


--
Simon Lloyd

Regards,
Simon Lloyd
'www.thecodecage.com' (http://www.thecodecage.com)
 
Top