Hi - I tried figuring my problem, very similar to this thread, on my own but have been unsuccessful. Hoping someone can help out.
I am trying to check for country in Column A and get count of values in column B after removing possible "#N/A" in column B. I also, need final count from column B that excludes any repeats. For data below, my final count from column B for each unique country in column A should be just 1 after removing #N/A and duplicates from column B
[TABLE="width: 182"]
<tbody>[TR]
[TD]Asia
[/TD]
[TD]0582.HK
[/TD]
[/TR]
[TR]
[TD]Australia
[/TD]
[TD]ARWDA.AX
[/TD]
[/TR]
[TR]
[TD]Australia
[/TD]
[TD]ARWDA.AX
[/TD]
[/TR]
[TR]
[TD]Australia
[/TD]
[TD]ARWDA.AX
[/TD]
[/TR]
[TR]
[TD]Europe
[/TD]
[TD="align: center"]#N/A
[/TD]
[/TR]
[TR]
[TD]Europe
[/TD]
[TD="align: center"]#N/A
[/TD]
[/TR]
[TR]
[TD]Europe
[/TD]
[TD="align: center"]#N/A
[/TD]
[/TR]
[TR]
[TD]Europe
[/TD]
[TD]CFTM.PA
[/TD]
[/TR]
[TR]
[TD]Europe
[/TD]
[TD]CFTM.PA
[/TD]
[/TR]
</tbody>[/TABLE]
With #N/A's in the relevant range...
[TABLE="width: 274"]
<tbody>[TR]
[TD="class: xl66, width: 64, bgcolor: transparent"]
X
[/TD]
[TD="class: xl66, width: 64, bgcolor: transparent"]
Y
[/TD]
[TD="class: xl65, width: 64, bgcolor: transparent"][/TD]
[TD="class: xl66, width: 64, bgcolor: transparent"]
X
[/TD]
[TD="class: xl65, width: 110, bgcolor: transparent"]
Unique Count
[/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent"]
Asia
[/TD]
[TD="class: xl65, bgcolor: transparent"]
0582.HK
[/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"]
Asia
[/TD]
[TD="class: xl65, bgcolor: transparent, align: right"]
1
[/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent"]
Australia
[/TD]
[TD="class: xl65, bgcolor: transparent"]
ARWDA.AX
[/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"]
Australia
[/TD]
[TD="class: xl65, bgcolor: transparent, align: right"]
1
[/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent"]
Australia
[/TD]
[TD="class: xl65, bgcolor: transparent"]
ARWDA.AX
[/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"]
Europe
[/TD]
[TD="class: xl65, bgcolor: transparent, align: right"]
1
[/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent"]
Australia
[/TD]
[TD="class: xl65, bgcolor: transparent"]
ARWDA.AX
[/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent"]
Europe
[/TD]
[TD="class: xl65, bgcolor: transparent, align: center"]
#N/A
[/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent"]
Europe
[/TD]
[TD="class: xl65, bgcolor: transparent, align: center"]
#N/A
[/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent"]
Europe
[/TD]
[TD="class: xl65, bgcolor: transparent, align: center"]
#N/A
[/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent"]
Europe
[/TD]
[TD="class: xl65, bgcolor: transparent"]
CFTM.PA
[/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent"]
Europe
[/TD]
[TD="class: xl65, bgcolor: transparent"]
CFTM.PA
[/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[/TR]
</tbody>[/TABLE]
E2, control+shift+enter, not just enter:
Rich (BB code):
=SUM(IF(FREQUENCY(IF($A$2:$A$10=$D2,
MATCH(IF(ISNA($B$2:$B$10),"#",$B$2:$B$10),
IF(ISNA($B$2:$B$10),"#",$B$2:$B$10),0)),ROW($B$2:$B$10)-ROW($B$2)+1),1))-
(SUM(IF($A$2:$A$10=$D2,IF(ISNA($B$2:$B$10),1)))>0)
By the way, are #N/A's in B2:B10 caused by a formula? If so, care to post that formula?