+ Reply to Thread
Results 1 to 5 of 5

Msgbox to show value of 2 cells if a value in another cell

  1. #1
    Registered User
    Join Date
    12-09-2010
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    13

    Msgbox to show value of 2 cells if a value in another cell

    Hi all

    This is very good forum and have found it very helpful loads of time and i wonder if anyone can help with one my problems i've been scratching my head over.

    I want a MsgBox to popup if any of the cells in a range eg a1:a100 have a value equal to or greater then 14. I want the MsgBox to show the value of 2 other cells: I have the current codes if any can help:

    Please Login or Register  to view this content.
    Last edited by syedalamgir; 10-24-2011 at 08:36 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Msgbox to show value of 2 cells if a value in another cell

    Maybe:

    Please Login or Register  to view this content.
    You didn't indicate what the "other 2 cells" would be if A15 were > 14, so this is a starting point for you.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    12-09-2010
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Msgbox to show value of 2 cells if a value in another cell

    Thank you Jbeaucaire;

    I don't think I explained my self well.

    What i'm trying to do is if a cell in range A1:O8 is >= 14 then it is going to pop a message box and instead of it showing the c.address in the msgbox I want it to show the time value from another cell and date value from antoher cell from the cell where the value is >=14

    I've attached a draft to show what i'm trying to do.

    so after having a look at the attachment if you have time it would be great help, and it will make more sense what i'm saying.

    Eg. if cell L4 is greater or equal to 14 then the messgbox will popup and show the message " too many students" and also the value of J4 and L1.

    These sheet gets updated everyday so next time a cell can be greater or = 14 in M2 and then again i want it to show the value of J2 and M1 in the message box etc

    I hope that makes sense cos i'm pulling my hair out searching for this solution.

    Thanks again for helping already.


    Quote Originally Posted by JBeaucaire View Post
    Maybe:

    Please Login or Register  to view this content.
    You didn't indicate what the "other 2 cells" would be if A15 were > 14, so this is a starting point for you.
    Attached Files Attached Files
    Last edited by syedalamgir; 10-22-2011 at 05:59 PM.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Msgbox to show value of 2 cells if a value in another cell

    Like so:

    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    12-09-2010
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Msgbox to show value of 2 cells if a value in another cell

    Hi JBeaucaire

    Thank you for all your help, its appreciated. I found the solution after you pointed me in the right direction: I had to alter the code a bit from what you gave since my data on the example is a bit more different than my real data but I've provided the code below incase it comes to someone elses use and I've also attached the excel file to make it easier to understand. Thanks once again. very very helpful, and very good forum.


    Please Login or Register  to view this content.




    Quote Originally Posted by JBeaucaire View Post
    Like so:

    Please Login or Register  to view this content.
    Attached Files Attached Files

+ 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