Thread: Target Macro
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Target Macro

something like
sub puttarget()
for i=6 to 10 step 2
if cells(i,"b")<"" then cells(i,"c")="Target"
next i
end sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"MCheru" wrote in message
...
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