VLookup with 2 values

Lynsvyr

New Member
Joined
May 11, 2022
Messages
3
Office Version
  1. 2010
Platform
  1. Windows
Right now I have an If statement which works great when I am running a specific location. However I was hoping to instead utilize a Vlookup to review tables

Currently this is my formula:
=IF(B8="Night 10 Hour","18:00",IF(B8="Day 10 Hour","07:00",IF(B8="BHN/RT","18:00")))
1652946700721.png
1652946810394.png


What I would like to do is have another worksheet with the times instead, then when I select my Location (ABQ1) and the Shift that is running (Night 10 Hour) return the value for the correct time.

For example if I select ABQ1 & Night 10 Hour then it would return the value in the other worksheet E3 (18:00) and place that in the first worksheet on C9.
or
If I select BOI2 & Day 10 Hour then it would return the value from the other worksheet C9 (7:00) and place that in the first worksheet on C9.
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Building this up in steps:
  • MATCH for the location: =MATCH("BOI2",'SHEETNAME'!A:A,0) -> should return the row where the data for that location starts (
  • MATCH for the hours: =MATCH("Days start",'SHEETNAME'!2:2,0) , assuming your headers (row 2 of your screenshot) are the same for every location, it should return the right column
  • after that you can take e.g. an INDEX function or an OFFSET function (from the MATCHes you'd need to do a -1 if you start from A1) to get to your value
Good luck,
Koen
 
Upvote 0

Forum statistics

Threads
1,214,978
Messages
6,122,547
Members
449,089
Latest member
davidcom

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