search column

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

TrustPilot

starstarstarstarstar Excellent

  • Home
  • Courses
  • Promotions
  • Schedule
  • Formats
  • Our Clients

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

Search a Column for

resolvedResolved · Low Priority · Version 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.


 

Excel tip:

New Normal Worksheet

Do you want all your worksheets to confirm to a certain look? Then change the Defaults!!!
1. Press Shift+F11 to create a new worksheet
2. Press Ctrl+A to select (higlight) all cells, Press Ctrl+1, make any formatting changes then click OK.
3. Press F12 (Function 12 key) click in the Save As Type, drop down, then select Template (*.xlt)
4. Click in the Save in drop-down, then find the folder; c:_program files_microsoft office_office_start. (For the underscores shown use backslash)
Name your templete sheet.xlt, then press Enter.
Sheet.xlt is used when you insert a new worksheet (Shift+F11)

Note: These changes are permanent changes on your PC.

View all Excel hints and tips


Server loaded in 0.08 secs.