+ Reply to Thread
Results 1 to 2 of 2

VBA - If cell in range is greater than = MsgBox

  1. #1
    Registered User
    Join Date
    11-14-2013
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    96

    VBA - If cell in range is greater than = MsgBox

    Hi all,

    Im looking to add conditional formatting but with a message box notification. Ive found examples of single cell references, but would like to select a column of cells, to the last row, and simply message the user IF one is greater than 2000.

    Is the only way to achieve this with a For loop? i could not figure the range of cells in an IF >2000 THEN MsgBox...

  2. #2
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: VBA - If cell in range is greater than = MsgBox

    Try this
    It checks (using CountIf) to see if any values in columnC exceed 2000 and then identifies which rows, and delivers a message with details

    Please Login or Register  to view this content.
    You could build your conditional formatting into the same loop

    If you want the message delivered without running the macro manually, then an event macro is required instead, triggered when values in the sheet change. (Is this what you want?)
    Last edited by kev_; 11-29-2016 at 01:47 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] MsgBox if any cell within range is blank
    By Samanthabenton in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-25-2016, 06:56 AM
  2. how do I Use Greater than ("Cell") to bring up a msgbox
    By Wouldsman in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-13-2015, 07:26 AM
  3. Replies: 4
    Last Post: 09-24-2013, 08:57 AM
  4. [SOLVED] MsgBox when a cell within a range changes to a specific value
    By kitackers in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-20-2012, 08:49 AM
  5. Msgbox all cells in workbook with a length greater than 50
    By hawkinsr86 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-26-2012, 11:41 AM
  6. MsgBox if the Active Cell is not within a preferred Range
    By Winon in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-03-2011, 05:52 AM
  7. How to show MsgBox if a any cell value is > 17 in a range
    By syedalamgir in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-12-2011, 08:48 PM

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