Countif, Frequency, Search...!

How_Do_I

Well-known Member
Joined
Oct 23, 2009
Messages
1,843
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 is there a formula that would count unique instances of cells containing the word “Cheshire” and another formula to extract them please… In my example there are 4 cells containing the word “Cheshire” but one is duplicated so my count return needs to be 3.

Excel Workbook
ABCD
16th (Service) Battalion Yorkshire Regiment (Green Howards)Unique5
29th (Service) Battalion Yorkshire Regiment (Green Howards)
39th (Service) Battalion Cheshire RegimentCheshire4
49th (Service) Battalion Cheshire Regiment
513th (Service) Battalion Cheshire Regiment
611th (Service) Battalion Cheshire Regiment
Sheet1



<!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="156"> </w:LatentStyles> </xml><![endif]--><!--[if !mso]>******** classid="clsid:38481807-CA0E-42D2-BF39-B33AF135CC4D" id=ieooui></object> <style> st1\:*{behavior:url(#ieooui) } </style> <![endif]--><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} </style> <![endif]-->
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
To count unique instances of cells containing Cheshire (C3) try this array formula

=SUM(IF(FREQUENCY(IF(ISNUMBER(SEARCH(C3,A1:A6)),MATCH(A1:A6,A1:A6,0)),ROW(A1:A6)-ROW(A1)+1),1))
Ctrl+Shift+Enter

M.
 
Upvote 0
Hi,

Another option if your ok using helper columns might be something like this:


Book1
ABCDEF
1ListDuplicateSearch resultUnique5
26th (Service) Battalion Yorkshire Regiment (Green Howards)FALSEFALSECheshire3
39th (Service) Battalion Yorkshire Regiment (Green Howards)FALSEFALSE
49th (Service) Battalion Cheshire RegimentFALSETRUE
59th (Service) Battalion Cheshire RegimentTRUETRUE
613th (Service) Battalion Cheshire RegimentFALSETRUE
711th (Service) Battalion Cheshire RegimentFALSETRUE
Sheet1
Cell Formulas
RangeFormula
B2=ISNUMBER(MATCH(A2, A$1:A1, 0))
C2=ISNUMBER(SEARCH(E$2, A2))
F1=COUNTIF(B2:B7, FALSE)
F2=COUNTIFS(B2:B7, FALSE, C2:C7, TRUE)
 
Upvote 0
Thanks Marcelo your formula worked... I couldn't use your formula circledchicken as I'm using xl 2003 but thanks for your time with your solution...
 
Upvote 0
You're welcome.

You have the solution from Marcelo but just as an aside the 2003 version of the F2 formula in my example would be something like:

=SUMPRODUCT(--NOT(B2:B7), --C2:C7)
 
Upvote 0

Forum statistics

Threads
1,224,899
Messages
6,181,627
Members
453,058
Latest member
rmd0725

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