+ Reply to Thread
Results 1 to 11 of 11

If cell above value popup window

  1. #1
    Registered User
    Join Date
    03-20-2010
    Location
    Portugal
    MS-Off Ver
    Excel 2019
    Posts
    69

    If cell above value popup window

    Hi ppl, i have this code, that when for example the cell U50 in Sheet1 is above the number difined in Sheet2 cell P15 it pops up a window saying that is above limit, it works well in an workbook but now i want to do the same to another workbook but i dont remember how does the "Val2" receives the value from Sheet1 U50 to test it, and do some code needs to be inside a function like a Private Sub Worksheet_Change(ByVal Target As Range) ?

    Can anyone help me to refresh my memory? Thanks


    Please Login or Register  to view this content.
    Last edited by Blue_Wings; 11-28-2011 at 12:34 AM.

  2. #2
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: If cell above value popup window

    Hello
    How about this?
    Using Macro...
    Please Login or Register  to view this content.
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  3. #3
    Registered User
    Join Date
    03-20-2010
    Location
    Portugal
    MS-Off Ver
    Excel 2019
    Posts
    69

    Re: If cell above value popup window

    I puted that inside the function:

    Please Login or Register  to view this content.
    And it didn´t work...

    But i changed to this:

    Please Login or Register  to view this content.
    And now it works Thanks

  4. #4
    Registered User
    Join Date
    03-20-2010
    Location
    Portugal
    MS-Off Ver
    Excel 2019
    Posts
    69

    Re: If cell above value popup window

    After all problem not solved... Because even when the cell is empty the popup box appears how can i avoid that ?
    Last edited by Blue_Wings; 11-28-2011 at 08:03 AM.

  5. #5
    Registered User
    Join Date
    03-20-2010
    Location
    Portugal
    MS-Off Ver
    Excel 2019
    Posts
    69

    Re: If cell above value popup window

    Now iy works with this:
    Please Login or Register  to view this content.
    And receiving the "Val5" value true this instruction on a cell: =MaximumCPT5(LOADSHEET!U51)

    But i have also a button to clean values with this:
    Please Login or Register  to view this content.
    When i press the button to clean the values, even if the values are already cleaned, the popup box appears anyway anyone knows why?

    Thanks.

  6. #6
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: If cell above value popup window

    Hello

    I'm Using excel 2010 it works fine here doesn't display message when below the maximumCPTload
    can you try to issue a ELSE before the ENDIF just to bypass the first IF. If the value is below the maximum.Just for experiment..

  7. #7
    Registered User
    Join Date
    03-20-2010
    Location
    Portugal
    MS-Off Ver
    Excel 2019
    Posts
    69

    Re: If cell above value popup window

    vlady thanks, i tried done that with the "else" but it didn´t work, imagine that the cells are already all clean (without values) and if you press the button "Clean Values" that calls the function ClearAllFields, all the pop up boxes with MsgBox will appear even more than one time (the MsgBox should only appear when i have a value imagine... superior to 9000), why do they keep on poping maybe 10 time each). and that is strange...

    Note: Sheet1 in portugal Folha1.

    Where is the code of Sheet1:

    Please Login or Register  to view this content.
    And this is the code in my Module1: (that have the code to clean all the cells values)

    Please Login or Register  to view this content.

    Thanks once again.
    Last edited by Blue_Wings; 11-28-2011 at 11:10 PM.

  8. #8
    Registered User
    Join Date
    03-20-2010
    Location
    Portugal
    MS-Off Ver
    Excel 2019
    Posts
    69

    Re: If cell above value popup window

    I dont know but... i was thinking, maybe because while it cleans the other cells values is allways checking the the cells with the MsgBox´s as well? and makes a scan in the function "Worksheet_Change(ByVal Target As Range)" ?

    Is there any way to clean the cells without passing the check on the cell contents in "Worksheet_Change(ByVal Target As Range)" ?

  9. #9
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: If cell above value popup window

    I think so, because it always check the cell if empty and the loop is the Worksheet_Change you can use a module for this also instead of the SUb-Endsub procedures.

    Like it will only check if you will run the macro(display the messages).

  10. #10
    Registered User
    Join Date
    03-20-2010
    Location
    Portugal
    MS-Off Ver
    Excel 2019
    Posts
    69

    Re: If cell above value popup window

    Quote Originally Posted by vlady View Post
    I think so, because it always check the cell if empty and the loop is the Worksheet_Change you can use a module for this also instead of the SUb-Endsub procedures.

    Like it will only check if you will run the macro(display the messages).
    Can you be more specific? I dont have that much knowledge.
    Thanks

  11. #11
    Registered User
    Join Date
    03-20-2010
    Location
    Portugal
    MS-Off Ver
    Excel 2019
    Posts
    69

    Re: If cell above value popup window

    Does anyone have more ideas?
    Because when i clean the cells if for example a msgbox had already appeared it will appear more 30 times when i press the button that calls the function that cleans all the cell, how can o avoid this?

    Thanks

+ 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