+ Reply to Thread
Results 1 to 4 of 4

How to use VBA to create two warning messages related to one cell

  1. #1
    Registered User
    Join Date
    09-04-2013
    Location
    Vancouver
    MS-Off Ver
    Excel 2013
    Posts
    2

    How to use VBA to create two warning messages related to one cell

    The Column C is a drop down list. The Column E is VLOOKUP function (Look up Column C and return certain values). Column F is manual update column. I would like to create two warning messages:
    1) If Column C is blank, a warning message "Fill Column C" shows up when trying to enter numbers in Column F.
    2) If "Wrong" shows up in Column E as a result of the VLOOKUP, a warning message "Correct Column E" shows up when try to enter numbers in Column F.

    So, to enter any numbers under Column F, Column C needs to be selected and Column E has to be valid (cannot be "Wrong").

    I would think this requires VBA codes (preferred), as I don't know how to have two different conditions on the same cell by Data Validation.

    Much appreciate your help in advance!

  2. #2
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: How to use VBA to create two warning messages related to one cell

    Hi.

    Try this code in the worksheet's module (right-click on the worksheet tab and select "View Code"):
    Please Login or Register  to view this content.
    Hope this helps

  3. #3
    Registered User
    Join Date
    09-04-2013
    Location
    Vancouver
    MS-Off Ver
    Excel 2013
    Posts
    2

    Re: How to use VBA to create two warning messages related to one cell

    It works! Thank you!

    Can we add a condition that only Row 11 to 25 applies? Right now the whole Column F applies...

  4. #4
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: How to use VBA to create two warning messages related to one cell

    Sure! Change
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    Hope this helps

+ 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. Smileys in Warning Messages in Formulas
    By robertguy in forum Excel General
    Replies: 5
    Last Post: 02-14-2012, 06:21 PM
  2. annoying sort warning messages
    By P D Sterling in forum Excel General
    Replies: 1
    Last Post: 07-22-2006, 08:05 AM
  3. [SOLVED] Outlook Warning Messages
    By AD108 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-02-2006, 01:10 PM
  4. [SOLVED] Disable cell warning/error messages
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-09-2006, 07:35 PM
  5. supressing system warning messages
    By ppete83606 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-15-2005, 01:05 AM

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