Target Macro

M

MCheru

What can I add to this macro so that it only gets activated when the same
cells in column B have contents? i.e. B6, B8, B10?

Sub Target()
ActiveCell.FormulaR1C1 = "Target"
Range("C6").Select
ActiveCell.FormulaR1C1 = "Target"
Range("C8").Select
ActiveCell.FormulaR1C1 = "Target"
Range("C10").Select
ActiveCell.FormulaR1C1 = "Target"
Range("C12").Select
ActiveCell.FormulaR1C1 = "Target"
Range("C14").Select
End Sub
 
D

Don Guillett

something like
sub puttarget()
for i=6 to 10 step 2
if cells(i,"b")<>"" then cells(i,"c")="Target"
next i
end sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top