Ignore Blank Cells on AutoFilter

G

GrandMaMa

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top