Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Display top 5 items from a list with matching criteria?

I have an excel sheet with several columns of data and would like to
pull a list of the top 10 records with matching criteria.

I have several columns like shown below (simplified for proof of
concept).

Record Number Record Name Record Value Type
1 One 100,000 B
2 Two 50,000 B
3 Three 80,000 A
4 Four 120,000 B
5 Five 100,000 A
etc...

I have a macro that sorts the column by record value, and want to
display the top 10 records of type B. With a vlookup I can pick out
the top item but I can not seem to get anything to then give me the
next matching record...

Is there anything I can do that will list the first matching record in
one cell, then give the next matching record in the next?

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,718
Default Display top 5 items from a list with matching criteria?

Assuming D2:D100 contain Record Value, C2:C100 contain Record Value

=LARGE(IF($D$2:$D$100="B",$C$2:$C$100),ROWS($1:1))

ctrl+shift+enter, not just enter
Drag the Fill Handle as far as needed


" wrote:

I have an excel sheet with several columns of data and would like to
pull a list of the top 10 records with matching criteria.

I have several columns like shown below (simplified for proof of
concept).

Record Number Record Name Record Value Type
1 One 100,000 B
2 Two 50,000 B
3 Three 80,000 A
4 Four 120,000 B
5 Five 100,000 A
etc...

I have a macro that sorts the column by record value, and want to
display the top 10 records of type B. With a vlookup I can pick out
the top item but I can not seem to get anything to then give me the
next matching record...

Is there anything I can do that will list the first matching record in
one cell, then give the next matching record in the next?


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,718
Default Display top 5 items from a list with matching criteria?

I meant D2:D100 contain Type

" wrote:

I have an excel sheet with several columns of data and would like to
pull a list of the top 10 records with matching criteria.

I have several columns like shown below (simplified for proof of
concept).

Record Number Record Name Record Value Type
1 One 100,000 B
2 Two 50,000 B
3 Three 80,000 A
4 Four 120,000 B
5 Five 100,000 A
etc...

I have a macro that sorts the column by record value, and want to
display the top 10 records of type B. With a vlookup I can pick out
the top item but I can not seem to get anything to then give me the
next matching record...

Is there anything I can do that will list the first matching record in
one cell, then give the next matching record in the next?


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Display top 5 items from a list with matching criteria?

On 25 Feb, 20:14, Teethless mama
wrote:
I meant D2:D100 contain Type



" wrote:
I have an excel sheet with several columns of data and would like to
pull a list of the top 10 records with matching criteria.


I have several columns like shown below (simplified for proof of
concept).


Record Number Record Name Record Value Type
1 One 100,000 B
2 Two 50,000 B
3 Three 80,000 A
4 Four 120,000 B
5 Five 100,000 A
etc...


I have a macro that sorts the column by record value, and want to
display the top 10 records of type B. With a vlookup I can pick out
the top item but I can not seem to get anything to then give me the
next matching record...


Is there anything I can do that will list the first matching record in
one cell, then give the next matching record in the next?- Hide quoted text -


- Show quoted text -


That's great for showing the value... how do I need to tweak that
though to get it to show the text values too (ie the record name etc)?

Thanks

Paul

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Display top 5 items from a list with matching criteria?

On 25 Feb, 20:30, wrote:
On 25 Feb, 20:14, Teethless mama





wrote:
I meant D2:D100 contain Type


" wrote:
I have an excel sheet with several columns of data and would like to
pull a list of the top 10 records with matching criteria.


I have several columns like shown below (simplified for proof of
concept).


Record Number Record Name Record Value Type
1 One 100,000 B
2 Two 50,000 B
3 Three 80,000 A
4 Four 120,000 B
5 Five 100,000 A
etc...


I have a macro that sorts the column by record value, and want to
display the top 10 records of type B. With a vlookup I can pick out
the top item but I can not seem to get anything to then give me the
next matching record...


Is there anything I can do that will list the first matching record in
one cell, then give the next matching record in the next?- Hide quoted text -


- Show quoted text -


That's great for showing the value... how do I need to tweak that
though to get it to show the text values too (ie the record name etc)?

Thanks

Paul- Hide quoted text -

- Show quoted text -


I tried changing it to the following:

=TEXT(IF($D$2:$D$100="B",$C$2:$C$100),ROWS($1:1))

but whilst the first one works, all the other rows just show the first
value, not the 2nd, 3rd etc like the code you posted does (for numbers
only tho)

Any ideas what I need to do to get it to behave with text entries too?



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,718
Default Display top 5 items from a list with matching criteria?

Assuming Record names in column B
I used the Column E as my previous reply

In F2: =INDEX($B$2:$B$100,MATCH(E2,$C$2:$C$100,0))


" wrote:

On 25 Feb, 20:30, wrote:
On 25 Feb, 20:14, Teethless mama





wrote:
I meant D2:D100 contain Type


" wrote:
I have an excel sheet with several columns of data and would like to
pull a list of the top 10 records with matching criteria.


I have several columns like shown below (simplified for proof of
concept).


Record Number Record Name Record Value Type
1 One 100,000 B
2 Two 50,000 B
3 Three 80,000 A
4 Four 120,000 B
5 Five 100,000 A
etc...


I have a macro that sorts the column by record value, and want to
display the top 10 records of type B. With a vlookup I can pick out
the top item but I can not seem to get anything to then give me the
next matching record...


Is there anything I can do that will list the first matching record in
one cell, then give the next matching record in the next?- Hide quoted text -


- Show quoted text -


That's great for showing the value... how do I need to tweak that
though to get it to show the text values too (ie the record name etc)?

Thanks

Paul- Hide quoted text -

- Show quoted text -


I tried changing it to the following:

=TEXT(IF($D$2:$D$100="B",$C$2:$C$100),ROWS($1:1))

but whilst the first one works, all the other rows just show the first
value, not the 2nd, 3rd etc like the code you posted does (for numbers
only tho)

Any ideas what I need to do to get it to behave with text entries too?


  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,979
Default Display top 5 items from a list with matching criteria?

You could create a pivot table from the data, with record number, record
name and record value in the row area, and type in the data area.
Then, hide the subtotals, and set the Record Number to show the top 10
values.

Or, use an Advanced Filter to extract the records. In the criteria area,
use the Record Value column heading.
In the cell below, use the formula:
="="&LARGE($C$2:$C$200,10)

wrote:
I have an excel sheet with several columns of data and would like to
pull a list of the top 10 records with matching criteria.

I have several columns like shown below (simplified for proof of
concept).

Record Number Record Name Record Value Type
1 One 100,000 B
2 Two 50,000 B
3 Three 80,000 A
4 Four 120,000 B
5 Five 100,000 A
etc...

I have a macro that sorts the column by record value, and want to
display the top 10 records of type B. With a vlookup I can pick out
the top item but I can not seem to get anything to then give me the
next matching record...

Is there anything I can do that will list the first matching record in
one cell, then give the next matching record in the next?



--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Display top 5 items from a list with matching criteria?

Try using AutoFilter

Filter on Type = B
Then filter on Record Value = top 10

Biff

wrote in message
oups.com...
I have an excel sheet with several columns of data and would like to
pull a list of the top 10 records with matching criteria.

I have several columns like shown below (simplified for proof of
concept).

Record Number Record Name Record Value Type
1 One 100,000 B
2 Two 50,000 B
3 Three 80,000 A
4 Four 120,000 B
5 Five 100,000 A
etc...

I have a macro that sorts the column by record value, and want to
display the top 10 records of type B. With a vlookup I can pick out
the top item but I can not seem to get anything to then give me the
next matching record...

Is there anything I can do that will list the first matching record in
one cell, then give the next matching record in the next?



  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Display top 5 items from a list with matching criteria?

What about possible ties?

Biff

"Teethless mama" wrote in message
...
Assuming Record names in column B
I used the Column E as my previous reply

In F2: =INDEX($B$2:$B$100,MATCH(E2,$C$2:$C$100,0))


" wrote:

On 25 Feb, 20:30, wrote:
On 25 Feb, 20:14, Teethless mama





wrote:
I meant D2:D100 contain Type

" wrote:
I have an excel sheet with several columns of data and would like
to
pull a list of the top 10 records with matching criteria.

I have several columns like shown below (simplified for proof of
concept).

Record Number Record Name Record Value Type
1 One 100,000 B
2 Two 50,000 B
3 Three 80,000 A
4 Four 120,000 B
5 Five 100,000 A
etc...

I have a macro that sorts the column by record value, and want to
display the top 10 records of type B. With a vlookup I can pick
out
the top item but I can not seem to get anything to then give me the
next matching record...

Is there anything I can do that will list the first matching record
in
one cell, then give the next matching record in the next?- Hide
quoted text -

- Show quoted text -

That's great for showing the value... how do I need to tweak that
though to get it to show the text values too (ie the record name etc)?

Thanks

Paul- Hide quoted text -

- Show quoted text -


I tried changing it to the following:

=TEXT(IF($D$2:$D$100="B",$C$2:$C$100),ROWS($1:1))

but whilst the first one works, all the other rows just show the first
value, not the 2nd, 3rd etc like the code you posted does (for numbers
only tho)

Any ideas what I need to do to get it to behave with text entries too?




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
Matching Items from 1 list to 2 others jack Excel Discussion (Misc queries) 3 February 19th 07 06:02 PM
formula to display first and last items of a list [email protected] Excel Worksheet Functions 2 February 15th 07 07:19 PM
Create list of text matching criteria MichaelG Excel Worksheet Functions 5 March 13th 06 06:00 PM
Need formula that Counts items matching criteria using two columns Juana Cafe Excel Worksheet Functions 4 March 3rd 06 08:41 PM
Extract multiple records matching criteria from list William DeLeo Excel Worksheet Functions 12 June 30th 05 02:35 PM


All times are GMT +1. The time now is 06:40 AM.

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

About Us

"It's about Microsoft Excel"