+ Reply to Thread
Results 1 to 3 of 3

Apply Conditional Formatting for Duplicate Numbers Based on Another Column's Criteria

  1. #1
    Registered User
    Join Date
    06-21-2018
    Location
    California, USA
    MS-Off Ver
    2016
    Posts
    2

    Apply Conditional Formatting for Duplicate Numbers Based on Another Column's Criteria

    Hello there,

    I am trying to come up with formula in conditional formatting that will highlight duplicate numbers, BOTH positive and negative. However, I need duplicate values highlighted only if they both have the same code in column A. In other words, I don't want "72,000" to be highlighted in the section where column A is "331011.5" because it shows up only once even though this number shows up in section 331011.2. This is hard for me to explain, so please let me know if I need to expand on anything.

    Below is the formula I currently have, but it is not working for me. Also below is a screenshot of my data.

    =SUMPRODUCT(N(ABS(H1)=ABS($H$1:$H$10000)*($A$1:$A$10000<>"")*($A$1:$A$10000=A1)))>1

    Capture.PNG
    Attached Images Attached Images

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,050

    Re: Apply Conditional Formatting for Duplicate Numbers Based on Another Column's Criteria

    Hi, welcome to the forum

    It's always better to upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.

    Having said that, I think you need to look at COUNTIFS(). Based on your supplied formula...
    =countifs(ABS($H$1:$H$10000, ABS(H1), $A$1:$A$10000,"<>",$A$1:$A$10000,A1)))>1
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    06-21-2018
    Location
    California, USA
    MS-Off Ver
    2016
    Posts
    2

    Re: Apply Conditional Formatting for Duplicate Numbers Based on Another Column's Criteria

    Hello,

    Thanks for the advice, I will definitely do that moving forward.

    Plugging in your formula gives me the error that there are too many arguments, so I took out "ABS" after countifs and it works that way. I do have a question about the way you structured your formula: how is the range ($H$1:$H$1000) a criteria in the countifs formula? I thought it is a range? Again, your formula worked without "ABS" but I am curious as to how it did.

    Thanks for the help!

+ 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. Conditional Formatting for Duplicate Values based on 3rd row Criteria
    By madnhain in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-15-2014, 03:23 PM
  2. [SOLVED] Using VBA to apply Conditional Formatting based on a calculation to Column
    By tonygg9 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-12-2014, 09:48 PM
  3. [SOLVED] formula that will apply points to minimum numbers in a column and allow duplicate results
    By hadleedog in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-14-2014, 06:24 PM
  4. Replies: 1
    Last Post: 07-12-2014, 07:14 PM
  5. Replies: 1
    Last Post: 05-28-2014, 06:31 PM
  6. VBA for Conditional Formatting - apply a colour based on conditions in each column.
    By acsishere in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-27-2013, 01:24 PM
  7. [SOLVED] Macro to apply several conditional formatting criteria
    By useR in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-04-2005, 12:05 PM

Tags for this Thread

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