multiple results from index match table, please help

daveexcellearner

New Member
Joined
Apr 3, 2016
Messages
2
Hi All, I am chasing some assistance on this table i have been working on all weekend.
I am new to the forum, thanks

In the below table i want to lookup a date out of range E4:I9 from G11 and return the row 3 heading, using index match ect.
the formulas used and dragged down from f12 and g12 are below.

I can get the desired results for column F (which farms are on the specified date) even with multiple results, works great, but i cannot get column G to work if there is more than one date, G12 is the problem formula.

Thanks in advance

1C D E F G H I
2FARM PLANTINGGUIDE
3APPLESPEARSGRAPESORANGESBEANS
4FARM 107-0607-0604-0806-0102-08
5FARM 201-0805-0907-0606-0223-02
6FARM 307-0601-0403-0307-0627-02
7FARM 404-0805-0607-0605-0931-10
8FARM 509-0607-0605-1108-1204-08
9FARM 602-0908-0607-0608-0925-12
10
11LOOKUP DATE07-06desired result
12FARM 1APPLESapples
13FARM 1APPLESpears
14FARM 2GRAPESgrapes
15FARM 3APPLESapples
16FARM 3APPLESoranges

<tbody>
</tbody>
Formula in F12 is
=IFERROR(INDEX($D$4:$D$9,SMALL(IF($G$11=$E$4:$I$9,ROW($E$4:$I$9)-ROW($E$4)+1),ROWS(F$12:F12))),"NIL")

Formula in G12 is
=IFERROR(INDEX($E$3:$I$3,MATCH($G$11,INDEX($E$4:$I$9,MATCH($F12,$D$4:$D$9,0),),0)),"NIL")
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Row\Col
D​
E​
F​
G​
H​
I​
1​
FARM PLANTING
GUIDE
2​
APPLES
PEARS
GRAPES
ORANGES
BEANS
3​
FARM 1
6/7/2016
6/7/2016
8/4/2016
1/6/2016
8/2/2016
4​
FARM 2
8/1/2016
9/5/2016
6/7/2016
2/6/2016
2/23/2016
5​
FARM 3
6/7/2016
4/1/2016
3/3/2016
6/7/2016
2/27/2016
6​
FARM 4
8/4/2016
6/5/2016
6/7/2016
9/5/2016
10/31/2016
7​
FARM 5
6/9/2016
6/7/2016
11/5/2016
12/8/2016
8/4/2016
8​
FARM 6
9/2/2016
6/8/2016
6/7/2016
9/8/2016
12/25/2016
9​
10​
LOOKUP DATE
6/7/2016
8​
11​
FARM 1
APPLES
12​
FARM 1
PEARS
13​
FARM 2
GRAPES
14​
FARM 3
APPLES
15​
FARM 3
ORANGES
16​
FARM 4
GRAPES
17​
FARM 5
PEARS
18​
FARM 6
GRAPES
19​

In G10 just enter:
Rich (BB code):
=COUNTIFS(E3:I8,F10)<strike></strike>

In F11 control+shift+enter, not just enter, and copy down:
Rich (BB code):
=IF(ROWS($F$11:F11)<=$G$10,INDEX($D$3:$D$8,SMALL(IF($E$3:$I$8=$F$10,
    ROW($D$3:$D$8)-ROW($D$3)+1),ROWS($F$11:F11))),"")<strike></strike>

In G11 control+shift+enter and copy down:
Rich (BB code):
=IF($F11="","",INDEX($E$2:$I$2,
    SMALL(IF(INDEX($E$3:$I$8,MATCH($F11,$D$3:$D$8,0),0)=$F$10,
    COLUMN($E$2:$I$2)-COLUMN($E$2)+1),COUNTIFS($F$11:F11,F11))))<strike></strike>
 
Upvote 0

Forum statistics

Threads
1,214,429
Messages
6,119,433
Members
448,897
Latest member
ksjohnson1970

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