Hello all!
I'm having a little trouble with a macro I am attempting to record. The macro is supposed to filter a table of data (removing all blanks rows) then select an area in prep to print. when I record the macro I use Ctrl + Shift + arrow key to select the area which I have used before to write a similar macro (which works perfectly) however this time it won't select past the coloums which filter the data. Does anyone know what could be causing this?
Example of the macro that's failing below;
Sub Macro4()
'
' Macro4 Macro
'
'
ActiveSheet.Range("$B$4:$V$99").AutoFilter Field:=5, Criteria1:="<>"
Range("O1").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToLeft)).Select
Range(Selection, Selection.End(xlToLeft)).Select
Range(Selection, Selection.End(xlToLeft)).Select
Range(Selection, Selection.End(xlToLeft)).Select
Range(Selection, Selection.End(xlToLeft)).Select
Range(Selection, Selection.End(xlToLeft)).Select
End Sub
Thank you in advance for any help you can offer!
I'm having a little trouble with a macro I am attempting to record. The macro is supposed to filter a table of data (removing all blanks rows) then select an area in prep to print. when I record the macro I use Ctrl + Shift + arrow key to select the area which I have used before to write a similar macro (which works perfectly) however this time it won't select past the coloums which filter the data. Does anyone know what could be causing this?
Example of the macro that's failing below;
Sub Macro4()
'
' Macro4 Macro
'
'
ActiveSheet.Range("$B$4:$V$99").AutoFilter Field:=5, Criteria1:="<>"
Range("O1").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToLeft)).Select
Range(Selection, Selection.End(xlToLeft)).Select
Range(Selection, Selection.End(xlToLeft)).Select
Range(Selection, Selection.End(xlToLeft)).Select
Range(Selection, Selection.End(xlToLeft)).Select
Range(Selection, Selection.End(xlToLeft)).Select
End Sub
Thank you in advance for any help you can offer!