VLOOKUP - Match Day and Time To return value from table

MrServer

New Member
Joined
Jan 26, 2015
Messages
2
Hi all!

I have a workbook with 2 sheets.

Sheet1 has:
Day of the week
Created time
Number
Sheet2 has:
A table with all days of the week like this, with starting time of 0:00 to 23:00 in 1 hour increments( 1:00, 2:00, 3:00, etc..)
Monday 0:00 - 23:00
Tuesday 0:00 - 23:00
etc..
Each day and Hour has a number assigned to it, for example Monday 6:00 has a number 1, Monday 8:00 has a number 3, and the same for the other days and times of the week. All that data in a table.

What I am trying to accomplish is on Sheet1, I want the Number to be pull from the table on Sheet 2. For example:
On sheet1:
Day of the week: Monday
Created Time: 6:07
Number: it will look at the table on sheet2 and match the day of the week and time and return the value assigned the day and time on sheet2 to the Number.

I was thinking on doing match and index, but I got lost with the times.

Any ideas on how to get this done?

Thanks in advance!
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Try:

Code:
=INDEX(Source!$C$1:$C$168,MATCH(INDEX({1,2,3,4,5,6,7},MATCH(A1,TEXT(TODAY()+{0,1,2,3,4,5,6},"DDDD"),0))&B1,INDEX({1,2,3,4,5,6,7},MATCH(Source!$A$1:$A$168,TEXT(TODAY()+{0,1,2,3,4,5,6},"DDDD"),0))&Source!$B$1:$B$168,1))

Please find the attached sample workbook for reference:

Code:
https://app.box.com/s/llx4nzh7qn6rtvrgc1igmrznqfyaw4xn
 
Upvote 0

Forum statistics

Threads
1,215,043
Messages
6,122,825
Members
449,096
Latest member
Erald

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