look up with multiple vertical & horizontal criteria

apn3a

New Member
Joined
Jun 10, 2015
Messages
2
hi,

so i am trying to create a formula where i can look up for a value by using multiple criteria. i want also to get the closest approximation value if one of the criteria is not met.

So my Lookup table is this:

E F G H I J K K M
DayNameIntervalsWeek 15Week 16Week 17Week 18Week 19Week 20
WedJohn21:0014.81718.31921.422.1
WedMaria11:0014.8174.844.64.5
MonStacey23:0014.81733.43.44.2
WedHoward14:0014.81733.43.44.2
WedHoward23:0014.81733.43.84.2

<tbody>
</tbody>

<tbody>
</tbody>

and the table i want to return values to (Column E) is this:

A B C D E
NameTime SlotWeekDayValue
John10:00Week 19Wed
Maria11:00Week 19Wed
Alissa11:00Week 19Thu
Howard13:00Week 19Wed
Stacey13:00Week 20Mon

<tbody>
</tbody>

What i want is to return the "Value" from the above table based on the criteria: Name Match, Timeslot Match (closest approximation if not exact value), Week Match and Day Match.

the sumproduct formula works great, but its not suitable for finding approximations.

the index match formula returns me either a wrong value or a #ref error (Ctrl+Shift+Enter) =INDEX($H$2:$M$6,MATCH(C2,$H$1:$M$1,0),MATCH(1,(A2=$F$2:$F$6)*(B2<=$G$2:$G$6)*(D2=$E$2:$E$6),0))

in E1 i expect to see 21.4
in E2 i expect to see 4.6
in E3 i expect to see nothing (0)
in E4 i expect to see 3.4

etc

Thanks!
 
Last edited:

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

Forum statistics

Threads
1,214,402
Messages
6,119,301
Members
448,885
Latest member
LokiSonic

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