Excel Vba 'Selection. Filldown' Copying Cell Above Selected Cell

I am currently working on a Macro that deals with a a set of filtered rows. The user needs to be able to create any number of rows for this macro to apply to, and there are some hidden rows due to the filter so I don't believe I can tell excel to select the next 100 rows to apply the macro to, as that would apply to the hidden cells.

The first part of the Macro goes like this:

ActiveSheet.Range("$A$1:$AW$377").AutoFilter Field:=18, Criteria1:="="
ActiveSheet.Range("$A$1:$AW$377").AutoFilter Field:=19, Criteria1:="<>"
Range("AB2").Select
Selection.FormulaR1C1 = "=IF(RC[-11]=""Monday"",RC[-12],""DELETE"")"
Range("AB2").Select
Selection.FillDown

That filldown command works perfectly whe I record the macro, but when it runs, instead of copying that cell down into all applicable cells below, it copys the header cell above it into the destination cell.

Is there another command I can use to get this running properly?

4
Sophia Al-Mansoor

Sophia Al-Mansoor

Global Business & E-Commerce Reporter

Sophia analyzes international trade, startup ecosystems, retail transformation, and supply chain logistics for modern digital publications.

Share this article