Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

STL - Formerly Best Training Solutions Through Learning
TrustPilot
Excellent
Request Callback We will call you back
0207 987 3777 Call for assistance
Your Basket Basket is empty
search column

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Search a Column for

Search a Column for

ResolvedVersion 2003

Daren has attended:
Excel VBA Intro Intermediate course

Search a Column for

I have a list of FALSE/TRUE statments in cells E37 to E48 from 12 tick boxes

I need to display a message box, only if all the cells are FALSE

How would write the routine

RE: Search a Column for

Hi Darren. The simplest way to do this would be to use the COUNTIF function in a piece of VBA code placed in the Worksheet module. COUNTIF will check whether you have 12 "TRUE" values and then display a message box.

Something like this:

If Application.COUNTIF(E37:E48, "TRUE") = 12 Then
MsgBox prompt = "This is my message alert""

Hope this helps,

Anthony

Tue 12 May 2009: Automatically marked as resolved.

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.11 secs.