+ Reply to Thread
Results 1 to 7 of 7

Count unique values only, over two columns in the same row

  1. #1
    Forum Contributor
    Join Date
    04-22-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    329

    Count unique values only, over two columns in the same row

    Good day all,

    I have a spreadsheet where I need a formula to count unique values only, where the date (Column B) a ID number (Column D) are different. Thanks in advance for any help, have a great day!

    Marco

    1.jpg

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Count unique values only, over two columns in the same row

    Not real clear.

    Do you want to count the unique ID numbers for a specific date?
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Expert
    Join Date
    03-28-2014
    Location
    Hyderabad,India
    MS-Off Ver
    Excel 2013
    Posts
    1,887

    Re: Count unique values only, over two columns in the same row

    Work Fine only for Unique ID paste this in Sheet D2

    Use Ctrl+Shift+Enter after pasting the formula
    =IFERROR(INDEX(Sheet1!D1:D14,MATCH(0,COUNTIF(Sheet2!$D$1:D1,Sheet1!D1:D14),0)),"")

  4. #4
    Forum Contributor
    Join Date
    04-22-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    329

    Re: Count unique values only, over two columns in the same row

    Sorry for the poor explanation,

    I examine a product numerous time throughout the day & may make up to 10 notes (rows) on its progression, i need this to calculate as 1 inspection for that entire day not 10 on that particular product ID, however on day 2 I may perform the same amount on inspections, I now need this to calculate 2 inspections not 20, basically if the product ID is repeated in the same day to only count it once, hope this makes sense? Thanks again for your time

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Count unique values only, over two columns in the same row

    Try this array formula**:

    =SUM(IF(FREQUENCY(MATCH(B2:B20&D2:D20,B2:B20&D2:D20,0),ROW(B2:B20)-ROW(B2)+1),1))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

    Adjust the ranges to suit.

  6. #6
    Forum Contributor
    Join Date
    04-22-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    329

    Re: Count unique values only, over two columns in the same row

    Hi Tony,

    Works like a charm, can't thank you enough!

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Count unique values only, over two columns in the same row

    You're welcome. Thanks for the feedback!

+ 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. [SOLVED] Find count of Unique or Duplicate Values based on Concatenated values in 2 columns
    By bdicarlo1 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 12-03-2014, 12:42 AM
  2. Count Unique values in Column based on values in other columns
    By dmschave in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-17-2014, 11:06 AM
  3. Replies: 16
    Last Post: 01-11-2012, 10:51 AM
  4. count unique values in columns based on date values
    By cclntn in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-29-2010, 06:16 PM
  5. Count values where unique in both columns
    By krabople in forum Excel General
    Replies: 2
    Last Post: 06-24-2009, 06:08 AM

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