Look up in large table?

brjohnson

New Member
Joined
Jun 4, 2011
Messages
48
Hi,

I have a series of 60 items in columns at the top of a table (columns ED-GK) and dates vertically down the left in column EC. On any given day 5 of them items are chosen and their names are displayed in the cells intersecting their column and the date row.

Is there a way for me set up a formula to auto pull what the 5 are on any given day?

For example: Could I input 1/8/2010 and get the names of the 5 items that had been ranked as the top 5 for that day and then change the date to 4/15/2011 and get that list of 5 to auto update?

Thanks!
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Hi,

I have a series of 60 items in columns at the top of a table (columns ED-GK) and dates vertically down the left in column EC. On any given day 5 of them items are chosen and their names are displayed in the cells intersecting their column and the date row.

Is there a way for me set up a formula to auto pull what the 5 are on any given day?

For example: Could I input 1/8/2010 and get the names of the 5 items that had been ranked as the top 5 for that day and then change the date to 4/15/2011 and get that list of 5 to auto update?

Thanks!
Let's see if we understand this...

Let's assume the cell EC10 = 1/8/2010.

Somewhere on row 10, ED10:GK10, there will be 5 names that you want to extract? Will there be more than 5 names on this row? If so, how do we know which 5 names you want to extract? You said:

5 items that had been ranked as the top 5 for that day
How are these items ranked?
 
Upvote 0
Thanks for the quick reply.

To address your points: somewhere in row 10 there will be 5 names - That is correct. It can however be more or less than 5 names, the exact number is dependent upon user input.

As for how they are ranked - I am ranking them elsewhere in the spreadsheet based on performance, and then populating the table based on those results.

The result could be expressed simply as:

1/8/2010 Ice Cream, Chocolate Sauce, Bananas, Cereal, Milk

Where the date is input in one cell and the formula throws the results in a cell separating with commas. If it easier to display the resulting items in separate cells that is fine as well.
 
Upvote 0
Thanks for the quick reply.

To address your points: somewhere in row 10 there will be 5 names - That is correct. It can however be more or less than 5 names, the exact number is dependent upon user input.

As for how they are ranked - I am ranking them elsewhere in the spreadsheet based on performance, and then populating the table based on those results.

The result could be expressed simply as:

1/8/2010 Ice Cream, Chocolate Sauce, Bananas, Cereal, Milk

Where the date is input in one cell and the formula throws the results in a cell separating with commas. If it easier to display the resulting items in separate cells that is fine as well.
Ok, without a more specific explanation of how the items are ranked the best I can do is extract the first N items from the corresponding row.

Will that suffice?
 
Upvote 0
That'd be great- so long as first N items can start at a spot within the row - as in not column A, but instead ED
 
Upvote 0
That'd be great- so long as first N items can start at a spot within the row - as in not column A, but instead ED
Try this...

Book1
ECEDEEEFEGEHEIEJ
1________
21/1/2011ABCDEFG
31/2/2011__H_I__
41/3/2011___J__K
51/4/2011_______
61/5/2011_LM_NOP
7________
8________
9________
101/3/2011JK
112_______
Sheet1

Enter this formula in EC11. This will return the count of records for the lookup date.

=COUNTA(INDEX(ED2:EJ6,MATCH(EC10,EC2:EC6,0),0))

Enter this array formula** in ED10. This will extract up to the first 5 items, from left to right, that correspond to the lookup date.

=IF(COLUMNS($ED10:ED10)>MIN($EC11,5),"",INDEX($ED2:$EJ6,MATCH($EC10,$EC2:$EC6,0),SMALL(IF(INDEX($ED2:$EJ6,MATCH($EC10,$EC2:$EC6,0),0)<>"",COLUMN($ED2:$EJ6)),COLUMNS($ED10:ED10))-COLUMN($ED2)+1))

** array formulas need to be entered using the key
combination of CTRL,SHIFT,ENTER (not just ENTER).
Hold down both the CTRL key and the SHIFT key
then hit ENTER.

Copy across to EH10.

Since that formula is a bit complicated I'm including a sample file that demonstrates this.

ZZZbrjohnson.xls 16kb

http://cjoint.com/?AGwwaUwffh3
 
Upvote 0
T Valko - just realized that I forgot to thank you for final response! Worked great and was exactly what I needed. Much appreciated!
 
Upvote 0

Forum statistics

Threads
1,224,602
Messages
6,179,844
Members
452,948
Latest member
UsmanAli786

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