# VLOOKUP - Match Day and Time To return value from table

#### MrServer

##### New Member
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?

### Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

#### RatExcel

##### Board Regular
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``

#### MrServer

##### New Member
Awesome!! it worked!!!

Thank you very much!!

1,102,271
Messages
5,485,779
Members
407,515
Latest member
franjey

### This Week's Hot Topics

• Finding issue in If elseif else with For each Loop
Finding issue in If elseif else with For each Loop I have tried this below code but i'm getting in Y column filled with W005. Colud you please...
• MsgBox Error
Hi Guys, I have the below error show up when i try and run my macro in File1 but works fine if i copy and paste the same code into file2. [ATTACH...
• CELL FORMAT - IF CONDITION
My Cell Format is [B]""0.00" Cr". [/B]But in the cell, it is showing 123.00 for editing. (123 is entry figure). (Data imported from other...
• Show numbers nearly the same
Is this possible. I have a number that can change very time eg 0.00001234 Then I have a lot of numbers 0.0000001, 0.0000002, 0.00000004...