# Count Unique Values in Different Columns

1. ## Count Unique Values in Different Columns

Greetings! I'm trying to count the number of unique rows, based off of the value in a completely different column. Attached is an example of what I'm working with. I'm essentially wanting to count the number of unique account numbers (Column A in 'Customer' tab), and unique customer numbers (Column B in 'Customer' tab), based off of the criteria that's in Column C in 'Customer' tab. Test File - Unique Counts.xlsx

2. ## Re: Count Unique Values in Different Columns

=SUMPRODUCT(--(FREQUENCY(IF(Customer!C\$2:C\$1308=\$C4,Customer!\$A\$2:\$A\$1308,""),IF(Customer!C\$2:C\$1308=\$C4,Customer!\$A\$2:\$A\$1308,""))>0)), CSE

3. ## Re: Count Unique Values in Different Columns

Try these:

D4 =COUNTIF(Customer!C:C,C4)
There are no duplicate account numbers

E4 =SUMPRODUCT((Customer!C\$2:C\$1308=C4)/COUNTIF(Customer!B\$2:B\$1308,Customer!B\$2:B\$1308&""))

Drag both formulas down.

4. ## Re: Count Unique Values in Different Columns

In "D4"
Formula:
`Please Login or Register  to view this content.`

In "E4"
Formula:
`Please Login or Register  to view this content.`

press Ctrl + Shift + Enter keys together

5. ## Re: Count Unique Values in Different Columns

This formula/function worked perfect, thank you! I definitely learned something new today

6. ## Re: Count Unique Values in Different Columns

You had 3 responses. I'm not sure which one you are referring to but glad we could help.

There are currently 1 users browsing this thread. (0 members and 1 guests)