Counting The Number Of Non-Duplicate Cells ??

Aitch

Board Regular
Joined
Jan 27, 2019
Messages
119
Office Version
  1. 2010
Platform
  1. Windows
What is the easiest way to count cells with the same value, across columns?

ABCDEFG
JackJillJohnJane4
JackJackJohnJohn2
JillJillJill1
JohnJackJackJane3

<tbody>
</tbody>


The first 4 columns have names as above, and column F has the number of non-duplicates - I hope I'm explaining it okay!

Thanks for the help!
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Hi there, you can do this with a formula like

=SUMPRODUCT(1/COUNTIF(data,data&""))

In your example if it starts in A1, then the formula in F3 would be: =SUMPRODUCT(1/COUNTIF(A3:D3,A3:D3&""))


NB I didn't create this formula - I have found it in the past and saved it for future use - I cant remember now where it came from.
 
Last edited:
Upvote 0
In F2 control+shift+enter, not just enter, and copy down:

=SUM(IF(FREQUENCY(IF(A2:D2<>"",MATCH(A2:D2,A2:D2,0)),COLUMN(A2:D2)-COLUMN(A2)+1),1))

which is a tad faster option.
 
Upvote 0

Forum statistics

Threads
1,214,946
Messages
6,122,401
Members
449,081
Latest member
JAMES KECULAH

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top