B
BoRed79
I have some VBA code which adds a month into cell Y3 if there is any value in
cell A3 and no value already in cell Y3 (see below):
Sub AddMonth()
If (Range("A3").Value <> "" And Range("Y3").Value = "") Then
Range("Y3").Select
ActiveCell.FormulaR1C1 = "Dec-2009"
Selection.NumberFormat = "mmm-yy"
End If
End Sub
I would like to set this up to loop so that it looks at all of the cells in
column A and Y for values and adds a date where appropriate.
Can anyone advise how I can loop this code?
Thanks.
Liz.
cell A3 and no value already in cell Y3 (see below):
Sub AddMonth()
If (Range("A3").Value <> "" And Range("Y3").Value = "") Then
Range("Y3").Select
ActiveCell.FormulaR1C1 = "Dec-2009"
Selection.NumberFormat = "mmm-yy"
End If
End Sub
I would like to set this up to loop so that it looks at all of the cells in
column A and Y for values and adds a date where appropriate.
Can anyone advise how I can loop this code?
Thanks.
Liz.