Littlemalky
Board Regular
- Joined
- Jan 14, 2011
- Messages
- 223
Hey, so I have my macro filtering by column "D", and if no data shows after the filter I need it to run a different filter; however, if that data is present then I need it to do something else. So the way I had originally set it up was like this:
However, it's not working because apparently offsetting it literally selects the cell right below, not the one that is showing after the filter. Does anyone know how to set this up so I can reference the cell as if i were clicking the down arrow on my keyboard after selecting D1?
Code:
Range("D1").Select
ActiveCell.Offset(1, 0).Select
If ActiveCell.Value = "" Then
ActiveSheet.Range("A:E").AutoFilter Field:=5, Criteria1:="<0", Operator:=xlFilterValues, VisibleDropDown:=True
Else
Range("D2:D" & LastRow).Select
Selection.Copy
Workbooks("Fulfillment " & Format(Date, "yyyymmdd") & " - Fox" & ".xlsx").Worksheets("48hrs Exclusion").Activate
ActiveSheet.Paste
Range("A1").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Select
Workbooks("Qry48hrsFox.xlsx").Activate
End If