Index match lookup formula help

Chris2022

New Member
Joined
Apr 25, 2022
Messages
4
Office Version
  1. 2016
Platform
  1. Windows
Hello everyone, I was here recently and was given great assistance by bebo021999 for an index match formula. I have a similar question pertaining to a data table. I have a separate table with truck driver driving hours limitations. What I would like to do is if I insert a class (1,2 or 3), and a rest time, have the formula return the maximum driving time for a particular driver. For example a driver has a class "1" rest facility, and rests for 1 hour and 50 minutes (01:50), the limitation would be 15 hours maximum driving time. It looks humanly impossible, but this driving time includes the rest period, meal and toilet breaks. I have used the following formula =LOOKUP(B2,F4:H4,INDEX(E5:E12,,MATCH(B1,$F$5:$H$12,0))). This only works for class 1, if I select 2 or 3, it returns #N/A. I have also tried several different combinations of INDEX and MATCH with no success. XL2BB doesn't work, so I have attached a photo of my worksheet. Any assistance is much appreciated. Cell B1 is the rest time and B2 is the class. I have posted this question yesterday, but since I replied to my own post, it looks like somebody has answered my post, so I have reposted this question here again.
Screenshot 2022-05-14 111154.png
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Try this:
Book1
ABCDEFGH
1Rest time2:05Max daily FDP with cabin rest
2Class2MaxMin cabin rest (h)
3ExtendedClass
4Max Ext. FDP15:00FDP123
514:301:301:301:30
615:001:452:002:20
715:302:002:202:40
816:002:152:403:00
916:302:353:00Not allowed
1017:003:003:25Not allowed
1117:303:25Not allowedNot allowed
1218:003:50Not allowedNot allowed
Sheet1
Cell Formulas
RangeFormula
B4B4=LOOKUP($B$1,INDEX($F$5:$H$12,,MATCH($B$2,$F$4:$H$4,0)),$E$5:$E$12)
 
Upvote 0
Solution
Try this:
Book1
ABCDEFGH
1Rest time2:05Max daily FDP with cabin rest
2Class2MaxMin cabin rest (h)
3ExtendedClass
4Max Ext. FDP15:00FDP123
514:301:301:301:30
615:001:452:002:20
715:302:002:202:40
816:002:152:403:00
916:302:353:00Not allowed
1017:003:003:25Not allowed
1117:303:25Not allowedNot allowed
1218:003:50Not allowedNot allowed
Sheet1
Cell Formulas
RangeFormula
B4B4=LOOKUP($B$1,INDEX($F$5:$H$12,,MATCH($B$2,$F$4:$H$4,0)),$E$5:$E$12)
Hi KRice, thank you so much! Worked like a charm! I had been searching for days trying to figure the formula out, and tried so many different combinations of lookup, index and match, but couldn't get anything to work. Greatly appreciate you sharing your excel skills with me to resolve my formula issue, and very promptly.
 
Upvote 0

Forum statistics

Threads
1,215,063
Messages
6,122,927
Members
449,094
Latest member
teemeren

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