Frequency again...!

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]--> I’m in a bit of a muddle here… On my worksheet I have 18781 burials in VARIOUS country locations… To count all the individual regiments of the burials (from the various countries), I used in cell AB2

=SUM(IF(FREQUENCY(IF(Regiment<>"",MATCH("~"&Regiment,Regiment&"",0)),ROW(Regiment)-ROW(I2)+1),1)) CSE

To pull the burials I used in cell AB3 downwards

=IF(ROWS($AB$3:AB3)>$AB$2,"",INDEX(Regiment,SMALL(IF(FREQUENCY(IF(Regiment<>"",MATCH("~"&Regiment,Regiment&"",0)),ROW(Regiment)-ROW($I$2)+1),ROW(Regiment)-ROW($I$2)+1),ROWS($AB$3:AB3)))) CSE…

When I count my returns I get 18781 so that is working…

Now I need only the burials in France so I’ve used in cell AE2

=SUM(IF(FREQUENCY(IF(Regiment<>"",IF(Country=$V$1,MATCH("~"&Regiment,Regiment&"",0))),ROW(Regiment)-ROW($I$2)+1),1)) CSE

V1 = “France” and in cell AE3 downwards I’ve used

=IF(ROWS($AE$3:AE3)>$AE$2,"",INDEX(Regiment,SMALL(IF(FREQUENCY(IF(Regiment<>"",IF(Country=$V$1,MATCH(Regiment,Regiment,0))),ROW(Regiment)-ROW($I$2)+1),ROW(Regiment)-ROW($I$2)+1),ROWS($AE$3:AE3)))) CSE to get the Regiments…

Can anyone see where I’m going wrong with the last two formulas as they are not returning the desired results…
<!--[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

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
I've solved this... Nothing wrong with the formulas, I counted my returns incorrectly...
 
Upvote 0
glad you have a result, had you tried pivot tables ?
 
Upvote 0

Forum statistics

Threads
1,224,899
Messages
6,181,629
Members
453,059
Latest member
jkevin

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