Unique text values in non adjacent columns

rjwalker2514

New Member
Joined
Aug 4, 2018
Messages
7
Column A Column C

Green Red
Red Orange
Orange Blue
Blue Green
Green Purple
Red Black

How do i set up a formula to show the number of unique entries across those two columns? The correct answer is 6 (Green, Red, Orange, Blue, Purple, Black)
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
what version of excel
=SUMPRODUCT((A1:B6<>"")/COUNTIF(A1:B6,A1:B6&""))
 
Upvote 0
Office 2016

The problem I'm having is that the data i want to count unique values of is columns A&C but there is other data in column B which I want the formula to ignore
 
Upvote 0
=SUM(1/COUNTIF($A$3:$A$8, $A$3:$A$8))+SUM(IF(COUNTIF($A$3:$A$8, $A$3:$A$8)=0, 1/COUNTIF($C$3:$C$8, $C$3:$C$8), 0))

 
Upvote 0
This is what I had originally. I have applied it to the actual data which I know the answer is 164 but the formula gives the result of 0.3333333
 
Upvote 0
Maybe:

Book1
ABCDE
1Column AColumn CShared Uniques
2GreenRed6
3RedOrange
4OrangePinkBlue
5BluemauveGreen
6GreenPurple
7RedBlack
8
Sheet5
Cell Formulas
RangeFormula
E2E2=SUM(SIGN(FREQUENCY(IFERROR(SMALL(IFERROR(IFERROR(MATCH(A2:C1000,A2:A1000,0),MATCH(A2:C1000,C2:C1000,0)+1000),""),ROW(1:1000)),""),ROW(1:2000))))
Press CTRL+SHIFT+ENTER to enter array formulas surrounded with curly braces.
 
Upvote 0
Shorter, and more in line with the previous formula:

=SUM(IFERROR((A2:C10<>"")*(COLUMN(A2:C10)<>2)/(COUNTIF(A2:A10,A2:C10)+COUNTIF(C2:C10,A2:C10)),0))

confirmed with Control+Shift+Enter.
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,869
Members
449,054
Latest member
juliecooper255

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