Countdiff with Criteria

How_Do_I

Well-known Member
Joined
Oct 23, 2009
Messages
1,831
Office Version
  1. 2010
Platform
  1. Windows
<!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:PunctuationKerning/> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:Compatibility> <w:BreakWrappedTables/> <w:SnapToGridInCell/> <w:WrapTextWithPunct/> <w:UseAsianBreakRules/> <w:DontGrowAutofit/> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]-->


Hello I want to count and then extract the non duplicates with a criteria… So with a criteria of “France” my F3 should return 2… Then HEBUTERNE MILITARY CEMETERY and DANTZIG ALLEY BRITISH CEMETERY, MAMETZ would be needed in F2 and F3 respectively… How would I achieve that please?


Sheet1

*ABCDEF
1France'4010'HEBUTERNE MILITARY CEMETERY2France3
2France'G/1330'DANTZIG ALLEY BRITISH CEMETERY, MAMETZ3*DANTZIG ALLEY BRITISH CEMETERY, MAMETZ
3India'176'BOMBAY 1914-1918 MEMORIAL, MUMBAI**HEBUTERNE MILITARY CEMETERY
4France4060'HEBUTERNE MILITARY CEMETERY***

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:64px;"><col style="width:64px;"><col style="width:305px;"><col style="width:64px;"><col style="width:64px;"><col style="width:305px;"></colgroup><tbody>
</tbody>

Spreadsheet Formulas
CellFormula
D1=COUNTDIFF($A$1:$A$4)
F1{=IF(A1:A3=E1,COUNTDIFF(C1:C4))}
D2=COUNTIF($A$1:$A$4,E1)

<tbody>
</tbody>
Formula Array:
Produce enclosing
{ } by entering
formula with CTRL+SHIFT+ENTER!

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

Forum statistics

Threads
1,214,833
Messages
6,121,868
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