Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Saadi
 
Posts: n/a
Default How to find top five States?

hi,
I have a problem in my records sheet. I have a field named "STATES", and the
task is to find out the top five states in it. Like the most repeated states
upto 5 levels. the Sample data is like,

MO
LA
LA
LA
MO
MO
MN
IL
FL
IA
MA
AK

Can anyone help me out to get rid of this problem. I am doing this manually
which is so difficult for me.

Thanks,
Saadi
  #2   Report Post  
Bernie Deitrick
 
Posts: n/a
Default

Saadi,

First, you need to make a table of all the possible values for that column.
You can use Data | Filter... Advanced Filter, unique records, copy to
another location to do that. Then, next to those values, use a formula like

=COUNTIF(A:A, T2)

Where A is the column with your states, and T2 is the first cell of the new
table of possible values.

Then next to that formula, use a ranking formula like

=RANK(U2,$U$2:$U$51)

And copy down. Then filter on values less than 5, based on that formula.

HTH,
Bernie
MS Excel MVP

"Saadi" wrote in message
...
hi,
I have a problem in my records sheet. I have a field named "STATES", and

the
task is to find out the top five states in it. Like the most repeated

states
upto 5 levels. the Sample data is like,

MO
LA
LA
LA
MO
MO
MN
IL
FL
IA
MA
AK

Can anyone help me out to get rid of this problem. I am doing this

manually
which is so difficult for me.

Thanks,
Saadi



  #3   Report Post  
Domenic
 
Posts: n/a
Default

Try the following approach, which will take into consideration ties for
5th place...

Assumption:

1) Column A contains your list

2) Your data starts in the second row

Formulas:

B2, copied down:

=IF(ISNA(MATCH(A2,$A$1:A1,0)),COUNTIF($A$2:$A$13,A 2),"")

C2, copied down:

D1: enter 5 (indicating you want a Top 5 list)

E1:

=MAX(IF(B2:B13=INDEX(B2:B13,MATCH(D1,C2:C13,0)),C2 :C13))-D1

....confirmed with CONTROL+SHIFT+ENTER

F2, copied down:

=IF(ROW()-ROW($F$2)+1<=$D$1+$E$1,INDEX($A$2:$A$13,MATCH(ROW( )-ROW($F$2)+1
,$C$2:$C$13,0)),"")

If you want a Top 10 list, Top 20 list, etc., change the number in D1 to
the desired number.

Hope this helps!

In article ,
"Saadi" wrote:

hi,
I have a problem in my records sheet. I have a field named "STATES", and the
task is to find out the top five states in it. Like the most repeated states
upto 5 levels. the Sample data is like,

MO
LA
LA
LA
MO
MO
MN
IL
FL
IA
MA
AK

Can anyone help me out to get rid of this problem. I am doing this manually
which is so difficult for me.

Thanks,
Saadi

  #4   Report Post  
Saadi
 
Posts: n/a
Default

Thanks Bernie Deitrick !!!
Thanks for you kind help. But I did it with other way, for you and others
here it is, may be helpful for someone,

First I get all of the possible states name in Column AB, and then put
formula
=COUNTIF($D$4:$D$250,AB4)
in column AA, drag it down and I get the total number of existence of each
state.

Then I put
=LARGE($AA$4:$AA$39,1) for 1st Largest number
=LARGE($AA$4:$AA$39,2) for 2nd Largest number
=LARGE($AA$4:$AA$39,3) for 3rd Largest number
=LARGE($AA$4:$AA$39,4) for 4th Largest number
=LARGE($AA$4:$AA$39,5) for 5th Largest number

in Cells D300, D301, D302, D303, D304, D305.

Then I put
=VLOOKUP(D300,$AA$4:$AB$39,2,FALSE)
and drag it down for all of five cells. and got me required result.

I know it is so confusing, but it good to get something by your own self.

once again Thanks Man,

Saadi

"Bernie Deitrick" wrote:

Saadi,

First, you need to make a table of all the possible values for that column.
You can use Data | Filter... Advanced Filter, unique records, copy to
another location to do that. Then, next to those values, use a formula like

=COUNTIF(A:A, T2)

Where A is the column with your states, and T2 is the first cell of the new
table of possible values.

Then next to that formula, use a ranking formula like

=RANK(U2,$U$2:$U$51)

And copy down. Then filter on values less than 5, based on that formula.

HTH,
Bernie
MS Excel MVP

"Saadi" wrote in message
...
hi,
I have a problem in my records sheet. I have a field named "STATES", and

the
task is to find out the top five states in it. Like the most repeated

states
upto 5 levels. the Sample data is like,

MO
LA
LA
LA
MO
MO
MN
IL
FL
IA
MA
AK

Can anyone help me out to get rid of this problem. I am doing this

manually
which is so difficult for me.

Thanks,
Saadi




  #5   Report Post  
saadi
 
Posts: n/a
Default

Thanks Bernie Deitrick !!!
Thanks for you kind help. But I did it with other way, for you and others
here it is, may be helpful for someone,

First I get all of the possible states name in Column AB, and then put
formula
=COUNTIF($D$4:$D$250,AB4)
in column AA, drag it down and I get the total number of existence of each
state.

Then I put
=LARGE($AA$4:$AA$39,1) for 1st Largest number
=LARGE($AA$4:$AA$39,2) for 2nd Largest number
=LARGE($AA$4:$AA$39,3) for 3rd Largest number
=LARGE($AA$4:$AA$39,4) for 4th Largest number
=LARGE($AA$4:$AA$39,5) for 5th Largest number

in Cells D300, D301, D302, D303, D304, D305.

Then I put
=VLOOKUP(D300,$AA$4:$AB$39,2,FALSE)
and drag it down for all of five cells. and got me required result.

I know it is so confusing, but it good to get something by your own self.

once again Thanks Man,

Saadi

"Bernie Deitrick" wrote:

Saadi,

First, you need to make a table of all the possible values for that column.
You can use Data | Filter... Advanced Filter, unique records, copy to
another location to do that. Then, next to those values, use a formula like

=COUNTIF(A:A, T2)

Where A is the column with your states, and T2 is the first cell of the new
table of possible values.

Then next to that formula, use a ranking formula like

=RANK(U2,$U$2:$U$51)

And copy down. Then filter on values less than 5, based on that formula.

HTH,
Bernie
MS Excel MVP

"Saadi" wrote in message
...
hi,
I have a problem in my records sheet. I have a field named "STATES", and

the
task is to find out the top five states in it. Like the most repeated

states
upto 5 levels. the Sample data is like,

MO
LA
LA
LA
MO
MO
MN
IL
FL
IA
MA
AK

Can anyone help me out to get rid of this problem. I am doing this

manually
which is so difficult for me.

Thanks,
Saadi






  #7   Report Post  
Domenic
 
Posts: n/a
Default

I just now emailed you a copy. I hope you find it helpful.

Cheers!

In article ,
"saadi" wrote:

Domenic,

I have tried but can't do it. can you please make it in a Excel sheet and
send it over. my mail id is

I shall be very thankful to you for this favor.

Saadi

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I compare data in two worksheets to find matching cells? Gary Excel Discussion (Misc queries) 4 March 2nd 06 09:04 PM
Using the Find tool in EXCEL TK Excel Worksheet Functions 2 February 11th 05 07:51 PM
find replace cursor default to find box luffa Excel Discussion (Misc queries) 0 February 3rd 05 12:11 AM
Excel has a "Find Next" command but no "Find Previous" command. Michael Fitzpatrick Excel Discussion (Misc queries) 2 January 10th 05 11:45 PM
VB Find and Replace Bony_Pony Excel Worksheet Functions 10 December 6th 04 05:45 PM


All times are GMT +1. The time now is 09:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"