Guys
i have a piece of code (noted with the *) that repeats itself over and over for different columns.
I want ot neaten this to be its own sub.
so ideally something written like this:
Can you lend a helping hand?
Thanks
i have a piece of code (noted with the *) that repeats itself over and over for different columns.
Code:
Range("D3").Select
ActiveCell.FormulaR1C1 = "=Year(NOW())"
If Cells(Rows.Count, "A").End(xlUp).Row > 3 Then
*LR = Cells.Find(What:="*", SearchDirection:=xlPrevious, SearchOrder:=xlByRows).Row
*ActiveCell.AutoFill Destination:=Range(ActiveCell, Range("D" & LR))
End If
I want ot neaten this to be its own sub.
so ideally something written like this:
Code:
Range("D3").Select
ActiveCell.FormulaR1C1 = "=Year(NOW())"
If Cells(Rows.Count, "A").End(xlUp).Row > 3 Then
*** Sub PasteDown
End If
Can you lend a helping hand?
Thanks