+ Reply to Thread
Results 1 to 7 of 7

Highlight duplicate numbers in rows and coloumns from a different range.

  1. #1
    Registered User
    Join Date
    06-20-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    4

    Smile Highlight duplicate numbers in rows and coloumns from a different range.

    Hi,
    I shall try to explain this properly.

    I have numbers in the range D8 thru I13. (1)
    I have numbers in the range D1 thru I5. (2)

    Now, what i want to do is have any numbers in range 1 that are also in range 2 highlight themselves. But the highlighting is only to be in range 1, and also, if there are any blank cells the highlighting should not happen. The duplicates that need to be counted are only entered numbers and not blanks.

    I have tried to attach an example of the spreadsheet. Hopefully that will help.

    Many thanks, in hope.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    10-27-2012
    Location
    London
    MS-Off Ver
    Excel 2007-2010
    Posts
    59

    Re: Highlight duplicate numbers in rows and coloumns from a different range.

    I have used the duplicate conditional formatting provided in excel 2013, however this conditionally formats both tables. AS you only want the 1st range to be highlighted I put a second conditional format on the second range to always show it as having no format. See attached.
    Attached Files Attached Files
    Break_Point

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,723

    Re: Highlight duplicate numbers in rows and coloumns from a different range.

    Highlight all the cells in Range1, starting from D8. Click on Conditional Formatting | New Rule | Use a formula ...

    Put this formula in the dialogue box:

    =AND(D8<>"",COUNTIF($D$1:$I$5,D8)>0)

    then click on the Format button | Fill tab and choose your colour. Then OK your way out, and the duplicates will be highlighted in your chosen colour.

    Hope this helps.

    Pete

  4. #4
    Forum Contributor
    Join Date
    05-09-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    259

    Re: Highlight duplicate numbers in rows and coloumns from a different range.

    I know this isn't what tou quite want but if your ranges could be in columns there is a formula to "pull" the duplicate numbers. Assuming using column A as range 2 and column B as range 2 then use formula
    Please Login or Register  to view this content.
    That's my help but maybe not very, sorry

  5. #5
    Forum Contributor
    Join Date
    05-09-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    259

    Re: Highlight duplicate numbers in rows and coloumns from a different range.

    Well done Peteuk that didnt cross my mind, go with Petes formula

  6. #6
    Registered User
    Join Date
    06-20-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Highlight duplicate numbers in rows and coloumns from a different range.

    Quote Originally Posted by Break_Point View Post
    I have used the duplicate conditional formatting provided in excel 2013, however this conditionally formats both tables. AS you only want the 1st range to be highlighted I put a second conditional format on the second range to always show it as having no format. See attached.
    Thanks for this. The initial formatting was the wrong way round (highlighting range 2 instead of range 1) but i sorted that. The only other problem is that duplicate numbers in the same range are highlighting each other. If for example range 1 has the number 49 listed twice it should only highlight if it is also located in range 2, not because it is duplicated in range 1.

  7. #7
    Registered User
    Join Date
    06-20-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Highlight duplicate numbers in rows and coloumns from a different range.

    Quote Originally Posted by Pete_UK View Post
    Highlight all the cells in Range1, starting from D8. Click on Conditional Formatting | New Rule | Use a formula ...

    Put this formula in the dialogue box:

    =AND(D8<>"",COUNTIF($D$1:$I$5,D8)>0)

    then click on the Format button | Fill tab and choose your colour. Then OK your way out, and the duplicates will be highlighted in your chosen colour.

    Hope this helps.

    Pete
    Pete i think you may just have saved any more of my hair being pulled out. lol. Thank You. I shall just have a play about with it and mark this as solved once im certain.

+ 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