![]() |
Ignore Blank Cells on AutoFilter
Hi Guys;
Dim aws as WorkSheet Dim FrstCol as String Dim ScndCol as String Dim ThrdCol as String Dim FrthCol as String Dim Course as String Set aws as ActiveSheet Course = InputBox("Enter The Column Number For The Subject You Teach") ' Calculations to Return Columns ' The Calculations return the Columns for the Students, these Four ' Columns have worked great until I ran into Blank Cells in a Column. I changed the code to: With aws .Columns(Course).AutoFilter Field:=1, Criteria1:="European Literature" .Columns(FrstCol).AutoFilter Field:=1, Criteria1:"" Error = Expected Name Parameter or Syntax Error .Columns(ScndCol).AutoFilter Field:=1, Criteria1:"" Error = Expected Name Parameter or Syntax Error .Columns(ThrdCol).AutoFilter Field:=1, Criteria1:"" Error = Expected Name Parameter or Syntax Error .Columns(FrthCol).AutoFilter Field:=1, Criteria1:"" Error = Expected Name Parameter or Syntax Error End With Question: How can I do an AutoFilter on Cells within a Column that have Data (Data will always be Letters from A to Z and will never be greater than four characters per column. There will always be a minimun of 1 character. Thanks in Advance Granny |
All times are GMT +1. The time now is 08:25 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com