+ Reply to Thread
Results 1 to 6 of 6

display message when values in 2 cells don't match.

  1. #1
    Forum Contributor
    Join Date
    08-29-2011
    Location
    Wisbech England
    MS-Off Ver
    Excel 2010
    Posts
    308

    display message when values in 2 cells don't match.

    Hi
    Can someone give me an idea of how can I display some sort of warning/message when values in 2 cells don't match?
    Please see the sample book there are 2 rows which have a New Version and current version when new version of the document is creadted all cells in this column will go red but I would like to have some sort of message if possible.
    Appreciate your help.
    Thank you
    Dan
    Attached Files Attached Files

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: display message when values in 2 cells don't match.

    Hi, ciapul12,

    maybe save the workbook as macro-enabled and add two procdures.

    ThisWorkbook:
    Please Login or Register  to view this content.
    Behind Sheet1:
    Please Login or Register  to view this content.
    Ciao,
    Holger
    Attached Files Attached Files
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: display message when values in 2 cells don't match.

    A very simple way to do this is to put a formula at the bottom of the columns showing a message if there was a change. This formula corresponds to the one you use to turn the cells red. Put in B21 and copy to the right:


    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  4. #4
    Forum Contributor
    Join Date
    08-29-2011
    Location
    Wisbech England
    MS-Off Ver
    Excel 2010
    Posts
    308

    Re: display message when values in 2 cells don't match.

    Quote Originally Posted by HaHoBe View Post
    Hi, ciapul12,

    maybe save the workbook as macro-enabled and add two procdures.

    ThisWorkbook:
    Please Login or Register  to view this content.
    Behind Sheet1:
    Please Login or Register  to view this content.
    Ciao,
    Holger
    Hi
    Thanks so much for your help I really like the idea of having macro doing it for me, however it seems there's a mistake in a code as it says "No match in version in D2" it should say B2 instead as this is where the change was made. in addition to this would it be possible to have a name of document in this message so for example if I change version No in document named "Procedure1" in the message it would say for example : "Procedure1 has been amended, new version is v4"

    Thank you
    Dan

  5. #5
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: display message when values in 2 cells don't match.

    Hi, ciapul12,

    ther愀 a general problem as the message box would be two columns off of the cell which really shows the mismatch (seems I don愒 know the Offset properly this Sunday) . Please replace the codelines
    Please Login or Register  to view this content.
    with
    Please Login or Register  to view this content.
    or
    Please Login or Register  to view this content.
    which will take the name of the procedure from Row 1 and the new Version from Row 2.

    Ciao,
    Holger

  6. #6
    Forum Contributor
    Join Date
    08-29-2011
    Location
    Wisbech England
    MS-Off Ver
    Excel 2010
    Posts
    308

    Re: display message when values in 2 cells don't match.

    Quote Originally Posted by HaHoBe View Post
    Hi, ciapul12,

    ther愀 a general problem as the message box would be two columns off of the cell which really shows the mismatch (seems I don愒 know the Offset properly this Sunday) . Please replace the codelines
    Please Login or Register  to view this content.
    with
    Please Login or Register  to view this content.
    or
    Please Login or Register  to view this content.
    which will take the name of the procedure from Row 1 and the new Version from Row 2.

    Ciao,
    Holger
    Hi Ciao
    This is exacly what I was after.
    Thaaaaannnnkkk youuuuuuu.7
    You're awesome!!
    Dan

+ 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. comparing two named ranges and if at least one match display a message
    By jwarner000 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-04-2013, 08:01 PM
  2. Replies: 1
    Last Post: 01-28-2012, 11:51 AM
  3. Replies: 1
    Last Post: 01-19-2011, 08:49 AM
  4. Message box to display range of cells. Solved, thanks
    By henrysmith in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-03-2009, 09:42 AM
  5. [SOLVED] Find a match and display a message
    By Woody in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 07-22-2005, 06:05 PM

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