ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to handle Blank Cells? (https://www.excelbanter.com/excel-programming/392842-how-handle-blank-cells.html)

GrandMaMa

How to handle Blank Cells?
 
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


Dan R.

How to handle Blank Cells?
 
aws.Columns(FrstCol).AutoFilter Field:=1, Criteria1:="<"

--
Dan


GrandMaMa

How to handle Blank Cells?
 
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!

"Dan R." wrote:

aws.Columns(FrstCol).AutoFilter Field:=1, Criteria1:="<"

--
Dan



Tom Ogilvy

How to handle Blank Cells?
 
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.

--
Regards,
Tom Ogilvy


"GrandMaMa" wrote:

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!

"Dan R." wrote:

aws.Columns(FrstCol).AutoFilter Field:=1, Criteria1:="<"

--
Dan




All times are GMT +1. The time now is 07:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com