Looking for blank values in a column, without using Autofilter

This code used to look at AC and tell me if there were any zero's in it.  How would use that same code to tell me if there are any blanks in it instead of zero's?  There is always data in column A.  Issue is that they are all blank.  If there are blanks I need to Exit For... so I need PurReqCreated to = False

How would I rewrite this to first select the proper lngLastRow based on data existing in column A, and second is there a blank in that range in column AC?    then   Set PurReqCreated = False

PurReqCreated = True  'Set as True to start.
'Define column AC and what is in it.
    lngLastRow = Range("AC" & Rows.Count).End(xlUp).Row
    PurReqCreated = Evaluate("NOT(-SUM(--(AC1:AC" & lngLastRow & "=0)))")
    'Evaluates if true or false. No zero's = True, Yes zero's False
'        If PurReqCreated = False Then Exit For
'   

Open in new window

RWayneHAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Saurabh Singh TeotiaCommented:
You can use this to do what you are looking for...

PurReqCreated = True  'Set as True to start.
'Define column AC and what is in it.
    lngLastRow = Range("AC" & Rows.Count).End(xlUp).Row
    PurReqCreated = Evaluate("NOT(-SUM(--(AC1:AC" & lngLastRow & "="""")))")
    'Evaluates if true or false. No zero's = True, Yes zero's False
'        If PurReqCreated = False Then Exit For

Open in new window


Saurabh...
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
RWayneHAuthor Commented:
I am afraid that because the only thing in AC is a column header that it will not define lngLastRow correctly.  My example has 3 rows and a header.  Column A will always have a value in it.  Testing it as is now
0
Saurabh Singh TeotiaCommented:
Change this to A Column then...

 lngLastRow = Range("A" & Rows.Count).End(xlUp).Row

Open in new window


and then use this to do whatever you are looking for..

Saurabh...
0
RWayneHAuthor Commented:
Thanks for the help.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.