+ Reply to Thread
Results 1 to 6 of 6

IF cell A = Y and cell B = "" THEN = messagebox

  1. #1
    Registered User
    Join Date
    12-20-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    14

    IF cell A = Y and cell B = "" THEN = messagebox

    Hi,

    This is a really simple one but I can't get it to work:

    I have a dropdown list with Yes or No in cell M14.

    I need the VBA code for:

    When M14 = Yes and M16 = "" (empty)
    for a message box to appear with "Please state the Filename"

    Many thanks
    Last edited by jammy78; 01-27-2012 at 05:50 AM.

  2. #2
    Valued Forum Contributor MaczaQ's Avatar
    Join Date
    06-03-2011
    Location
    Poland
    MS-Off Ver
    Excel 2003 / XP
    Posts
    510

    Re: IF cell A = Y and cell B = "" THEN = messagebox

    try this way ... type below code in your sheet's code
    Please Login or Register  to view this content.
    Best Regards
    MaczaQ
    ---------------------------------------------------------------------------------------------------------------------------
    If you are satisfied with the solution(s) provided, please mark your thread as Solved
    If you are pleased with my answer consider to rate it. To thank someone who has helped you, click on the star icon below their name.
    - This way you will add him some reputation points ... thanks in advance.

  3. #3
    Registered User
    Join Date
    12-20-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: IF cell A = Y and cell B = "" THEN = messagebox

    Sorry, I should have probably said - I want to add the code to an existing command.

    This is some of the code in the command:

    Please Login or Register  to view this content.
    So I need to add it to this!

  4. #4
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,060

    Re: IF cell A = Y and cell B = "" THEN = messagebox

    see the code provided by maczaq and change it for yr needs
    as an option
    Please Login or Register  to view this content.
    Regards, John55
    If you have issues with Code I've provided, I appreciate your feedback.
    In the event Code provided resolves your issue, please mark your Thread as SOLVED.
    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

    ...enjoy -funny parrots-

  5. #5
    Valued Forum Contributor MaczaQ's Avatar
    Join Date
    06-03-2011
    Location
    Poland
    MS-Off Ver
    Excel 2003 / XP
    Posts
    510

    Re: IF cell A = Y and cell B = "" THEN = messagebox

    nothing more to say that john55 wrote

    maybe shorter code ?
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    12-20-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: IF cell A = Y and cell B = "" THEN = messagebox

    Quote Originally Posted by maczaq View Post
    nothing more to say that john55 wrote

    maybe shorter code ?
    Please Login or Register  to view this content.
    What a fool..... I forgot to put the " " round the yes, when I tried! It was a long day.......... ?

    Many thanks for the help!

+ 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