+ Reply to Thread
Results 1 to 4 of 4

Message box if Cell equals Text

  1. #1
    Registered User
    Join Date
    11-03-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    22

    Message box if Cell equals Text

    Hello,

    I have formula in column R for example which is looking up to data in column Q the formula is a VLOOKUP with an IF basically if the text found in column Q is contained in a provided table then cell in column R returns the word "OK" if the text is not found then cell in column R returns the work "ERROR"

    I would like to create a code which checks the text in column R and if cell = "ERROR" then a message box appears

    The list in column Q & R are dynamic so I either need to check per cell and loop or look at the entire range of R:R

    Thanks

  2. #2
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Message box if Cell equals Text

    A basic problem is that a cell changing as a result of a formula calculation does not raise the Worksheet_Change event so there is no easy way to run code when the cell contains "ERROR".

    Conditional formatting might be a suitable workaround...

  3. #3
    Registered User
    Join Date
    11-03-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Message box if Cell equals Text

    Hi cytop,

    I've actually found a bit of code which is working quite well

    Please Login or Register  to view this content.
    the only problem I am having now is that this only works if the error is contained in cell R2 I cannot seem to work out how to loop this until column R is empty.

    thanks

  4. #4
    Registered User
    Join Date
    11-03-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Message box if Cell equals Text

    Bumping this if anyway has any suggestions on how to loop the above code through the column?
    ie. the word Error may appear anywhere throughout column R at the moment the message box only appears if the word Error is found in cell R2

    thank you

+ 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. Pop Up Message If Cell equals A Date
    By Fuzzbucket1 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-22-2016, 10:04 AM
  2. [SOLVED] Message box with VBA when cell selected AND other cell equals "X"
    By 97hills in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-02-2013, 10:42 AM
  3. Text box equals cell value problem
    By bnd10706 in forum Excel General
    Replies: 5
    Last Post: 10-13-2012, 02:37 PM
  4. Replies: 8
    Last Post: 03-30-2012, 07:52 PM
  5. creating a error message when cell equals zero
    By Kristina1976 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 08-17-2010, 06:25 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