+ Reply to Thread
Results 1 to 6 of 6

Msgbox to present values not found

  1. #1
    Registered User
    Join Date
    02-28-2012
    Location
    Rio de Janeiro, Brazil
    MS-Off Ver
    Excel 2007
    Posts
    37

    Msgbox to present values not found

    Hi guys,

    If I have the following data

    Instrument Price
    ENI US 17.63
    EOC US 44.35
    VALE US n/a
    CIB US 59.56
    EBR US n/a


    Could anyone please help me create a msgbox that would return something like the following:

    "Unable to find price for VALE US and EBR US"

    Thanks in advance!!
    Last edited by pedrofogao21; 03-26-2012 at 03:10 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    03-14-2012
    Location
    Arizona USA
    MS-Off Ver
    Excel 2000/2007
    Posts
    408

    Re: Msgbox to present values not found

    There needs to be some trigger for the msgbox to appear. This also means that there must already be a macro running too.

  3. #3
    Registered User
    Join Date
    02-28-2012
    Location
    Rio de Janeiro, Brazil
    MS-Off Ver
    Excel 2007
    Posts
    37

    Re: Msgbox to present values not found

    Yes, I understand.

    That is what I am looking for: a code that would search the entire column B for "n/a" and in the end display a msgbox with the corresponding values in column A.

    Thanks Dennis

  4. #4
    Forum Contributor tkowal's Avatar
    Join Date
    11-20-2010
    Location
    Miami, Fl
    MS-Off Ver
    Excel 2010
    Posts
    150

    Re: Msgbox to present values not found

    Dennis is absolutely correct -- you need a trigger.

    In the attached workbook, I took a guess at what you wanted. I provide two ways (of many) of getting this information across to your user.... one with no code and the other with vba....

    messagebox.xlsm
    Ted
    "Live Long and Prosper"

  5. #5
    Valued Forum Contributor
    Join Date
    03-14-2012
    Location
    Arizona USA
    MS-Off Ver
    Excel 2000/2007
    Posts
    408

    Re: Msgbox to present values not found

    Quote Originally Posted by pedrofogao21 View Post
    Yes, I understand.

    That is what I am looking for: a code that would search the entire column B for "n/a" and in the end display a msgbox with the corresponding values in column A.

    Thanks Dennis
    If you have many instances of "n/a" showing up, the msgbox thing will get very annoying for the user.

  6. #6
    Registered User
    Join Date
    02-28-2012
    Location
    Rio de Janeiro, Brazil
    MS-Off Ver
    Excel 2007
    Posts
    37

    Re: Msgbox to present values not found

    Thanks tkowal and Dennis.

    The code works perfectly.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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