How to handle Blank Cells?

G

GrandMaMa

I have posted this twice before but never got a single response. Is it
possible that this cannot be accomplished?

I have an application where I must have five AutoFilters.

Depending the certain criteria this is what I must do.

' Select Class & Subject to be Filtered!

Dim Course as String

Course = InputBox("Enter The Column Number For The Subject You Teach")

aws.Columns(Course).AutoFilter Field:=1, Criteria1:="European Literature"

' Determine if English has been taken

Dim FrstCol as String

aws.Columns(FrstCol).AutoFilter Field:=1, Criteria1:>"" Error =
Expected Name Parameter or Syntax Error

To do this I must Check to see if Certain Columns have data in them, I
must print out all Lines that have a Blank Cell in any of Four Columns.
(These are errors).

I then must copy the lines that match my criteria that is inputed, and
check another column to make sure there are no Blanks(Spaces) in any cell.

I am sure I can figure out the rest without any assistance.

Sorry I am having a difficult time explaining my dilema.

Is it possible to filter out Blank(Spaces) and include the records that have
no Blanks(Spaces) in a column?

I get a halt on the line indicated above.

Thanks

Granny
 
G

GrandMaMa

Dan;
Thank You!

If I knew the correct syntax's I would be a genius. You have no idea
how many guesses I took.

Granny, Have a Great Weekend!
 
T

Tom Ogilvy

The sad thing is you don't have to guess. Turn on the macro recorder in
Tools=>Macro=>Record a New macro. Perform the action manually. Turn off the
macro recorder the same way.

Look at the recorded code. You now have the syntax. Good chance that is
how Dan came up with the criteria1 argument.
 

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