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

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
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,920
Messages
6,122,267
Members
449,075
Latest member
staticfluids

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