+ Reply to Thread
Results 1 to 7 of 7

check column for value and show message box

  1. #1
    Registered User
    Join Date
    12-21-2011
    Location
    Chicago
    MS-Off Ver
    Excel 2007
    Posts
    30

    check column for value and show message box

    Hi all,

    I know this will be a if then macro but I don't know how to write these. Basically what I am looking for is a macro that will check column J from A2 down for a value of 75 or larger, if over or equal to 75 show message box ( i'll figure out what to say in it later), if the numbers are all under 75 show message box "done". the numbers are times in mm:ss.

    Thanks in advance.
    Last edited by chi11; 01-11-2012 at 01:18 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: check column for value and show message box

    This macro will use an AUTOFILTER on column J to see if any values are equal/greater than your NumCheck:
    Please Login or Register  to view this content.

    Put the macro into a normal code module (Insert > Module), not a sheet module. Then use a button on your sheet to run it, or run it with Alt-F8.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    12-21-2011
    Location
    Chicago
    MS-Off Ver
    Excel 2007
    Posts
    30

    Re: check column for value and show message box

    sweet that works awesome, is there anyway something could be added to highlight that row??

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: check column for value and show message box

    It could be more than one row, yes?

  5. #5
    Registered User
    Join Date
    12-21-2011
    Location
    Chicago
    MS-Off Ver
    Excel 2007
    Posts
    30

    Re: check column for value and show message box

    yes it can be

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: check column for value and show message box

    Except for the popup message, this could actually be done in column F using nothing more than Conditional Formatting. Then a quick glance down the column and you would see the highlighted cells.

    Anyway....
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    12-21-2011
    Location
    Chicago
    MS-Off Ver
    Excel 2007
    Posts
    30

    Re: check column for value and show message box

    works awesome, REP ++

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1