Hi,
How do I ammend the below please, so the formula is not applied to cells not showing due to not meeting current filter criteria on cells.
Blag scenario:
e.g. have an existing column of data in Col B. Column has a filter on for even numbers etc, run my macro and it currently copies formula down for all cells existing in column B. Including odd numbers hidden by filter. How do I ammend please so only applies to even numbers/filter conditions?
Many Thanks
Gareth
How do I ammend the below please, so the formula is not applied to cells not showing due to not meeting current filter criteria on cells.
Blag scenario:
e.g. have an existing column of data in Col B. Column has a filter on for even numbers etc, run my macro and it currently copies formula down for all cells existing in column B. Including odd numbers hidden by filter. How do I ammend please so only applies to even numbers/filter conditions?
VBA Code:
Sub Macro2()
'
' Keyboard Shortcut: Ctrl+K
'
Dim a As Long
a = ActiveCell.SpecialCells(xlLastCell).Row
Selection.AutoFill Destination:=Range(Cells(ActiveCell.Row, ActiveCell.Column).Address & ":" & _
Cells(a, ActiveCell.Column).Address)
End Sub
Many Thanks
Gareth