Count Unique Values across two (2) columns - similar data in each column

tlmf2222

Board Regular
Joined
Mar 10, 2006
Messages
54
Hello, I am trying to find a way to count unique values across multiple columns, but not a combination of values across both columns, but rather unique values *across* both rows. For example:

Column A Column B
Mark Mary
Mark Steve
Mary Linda
Mary Steve
Steve Steve

I would want the formula to return 4, as there are 4 unique values if you look at both columns together (Mary, Mary, Steve, Linda). (It's almost as if you would combine both columns into one columns, and then count unique values). The Difference here from other similar threads I have found is that I don't care about the relationship of values between columns that are on the same row.

Is there a way to do this using a formula?

Thanks so much!

Mark
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Thanks, would this work if there are blank values involved? I keep getting a returned formula result of zero. (Also, and I don't think this matters, the formula is referencing columns on a separate tab within the same worksheet).

Also, the fields that I am trying to get the unique count on are formula results, and not plan text. Not sure if that matters either...

Thanks again,

Mark
 
Last edited:
Upvote 0
(1) The formula does not count blanks as a unique item.

(2) Text or number should not matter.

(3) Referencing data on a different sheet will not thwart the formula at all.
 
Upvote 0
Thank you all - I got it to work. Clearly the problem I was having was between keyboard and chair. :)
 
Upvote 0

Forum statistics

Threads
1,215,043
Messages
6,122,816
Members
449,095
Latest member
m_smith_solihull

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