+ Reply to Thread
Results 1 to 4 of 4

conditional format to ensure data range matches

  1. #1
    Registered User
    Join Date
    10-24-2005
    MS-Off Ver
    2003
    Posts
    10

    conditional format to ensure data range matches

    Hi

    Need a Conditional Format or Validation formula to highlight when, for the same value in column A (12) the values in column B are NOT the same (should be all 46 or all 47).

    Order# Customer#
    12 ____ 46
    12 ____ 47
    12 ____ 47


    Thanks
    Mat
    Last edited by tuizner; 03-19-2010 at 04:41 PM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: conditional format to ensure data range matches

    Which version of XL are you using ?

    Assuming Pre XL2007 and cells to be validated are B2:B4 then with said range highlighted:

    =SUMPRODUCT(($A$2:$A$4=$A2)*ISNUMBER($B$2:$B$4)*($B$2:$B$4<>$B2))=0

    Validation has it's limits of course...

  3. #3
    Registered User
    Join Date
    10-24-2005
    MS-Off Ver
    2003
    Posts
    10

    Re: conditional format to ensure data range matches

    Quote Originally Posted by DonkeyOte View Post
    Which version of XL are you using ?

    Assuming Pre XL2007 and cells to be validated are B2:B4 then with said range highlighted:

    =SUMPRODUCT(($A$2:$A$4=$A2)*ISNUMBER($B$2:$B$4)*($B$2:$B$4<>$B2))=0

    Validation has it's limits of course...


    Thanks Senor Quixote - great work!

    Works a treat - can also increase range A2:A999 for example.

    One error though and that is your final term should be <>0 rather than =0
    =SUMPRODUCT(($A$2:$A$4=$A2)*ISNUMBER($B$2:$B$4)*($B$2:$B$4<>$B2))=0

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: conditional format to ensure data range matches

    Quote Originally Posted by tuizner
    One error though and that is your final term should be <>0 rather than =0
    Yes if you're referring to Conditional Formatting.

    Not so if you're referring (as I was) to Data Validation (the =0 test ensures entry is consistent with prior entries should they exist)

+ 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