Counting unique text values

sobeitjedi

Board Regular
Joined
Mar 13, 2006
Messages
235
Office Version
  1. 365
Hopefully this is quite a simple question ...

In a cell in sheet 1, I wish to count the number of unique entries in total in column A of sheet2, sheet3 & sheet4. Column A in these sheets contains peoples names (text field).

Can you help?
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
assuming that the count is to start from A2. Here is formula to count unique values in columnA in sheet2 (increase the range if there are more than 10,000 rows)

=SUMPRODUCT((Sheet2!A2:A9999<>"")/COUNTIF(Sheet2!A2:A9999,Sheet2!A2:A9999&""))
 
Upvote 0
assuming that the count is to start from A2. Here is formula to count unique values in columnA in sheet2 (increase the range if there are more than 10,000 rows)

=SUMPRODUCT((Sheet2!A2:A9999<>"")/COUNTIF(Sheet2!A2:A9999,Sheet2!A2:A9999&""))

But this will just count sheet2, right? What about column A in sheet 3 and column A in sheet 4?
 
Upvote 0
Use the same formula amended for sheet3 and sheet4 and add them together

=SUMPRODUCT((Sheet2!A2:A9999<>"")/COUNTIF(Sheet2!A2:A9999,Sheet2!A2:A9999&"")) + SUMPRODUCT((Sheet3!....) + SUMPRODUCT((Sheet4!....)

Which counts the values unique to each sheet
So if Ann appears 5 times on Sheet2, 10 times on Sheet3, 12 times on Sheet4 ... the count returns 3

Is that what you want? Or are you trying to eliminate names that are common between sheets? ... so that the count returns 1
 
Upvote 0
Use the same formula amended for sheet3 and sheet4 and add them together

=SUMPRODUCT((Sheet2!A2:A9999<>"")/COUNTIF(Sheet2!A2:A9999,Sheet2!A2:A9999&"")) + SUMPRODUCT((Sheet3!....) + SUMPRODUCT((Sheet4!....)

Which counts the values unique to each sheet
So if Ann appears 5 times on Sheet2, 10 times on Sheet3, 12 times on Sheet4 ... the count returns 3

Is that what you want? Or are you trying to eliminate names that are common between sheets? ... so that the count returns 1

Yes, the latter - I want to count the unique values in total across the sheets, so in your example it would be 1 for Ann.
 
Upvote 0

Forum statistics

Threads
1,215,762
Messages
6,126,736
Members
449,334
Latest member
moses007

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