• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Vlookup with time

gmskalyan

New Member
Dear Friends,

Its very nice and happy moments meeting you all.:). I learnt new things in excel from this place and website..Really amazing help done by all..

I had a query which require help from any one of the members. i need a table with time slots (intervals) .

My requirement is like below:
In Column B, a series of time are entered.
I need a formula in Column C to return the time slot based on predefined table like Morning , Noon,Evening or night.
DateTimeSlot
1-Apr-21​
8:56 AM​
Morning
1-Apr-21​
11:56 AM​
Afternoon
1-Apr-21​
5:56 PM​
Evening
2-Apr-21​
8:59 AM​
Morning
2-Apr-21​
11:59 AM​
Afternoon
2-Apr-21​
8:59 PM​
Evening
3-Apr-21​
11:21 AM​
Morning
3-Apr-21​
12:21 PM​
Afternoon
3-Apr-21​
7:21 PM​
Evening

Master table/ pre defined slot table for time ranges is as below:

05:00AM to 10:59AM - Morning
11:00AM to 4:59PM - Noon
5:00PM to 09:59PM- Evening
10:00 PM to 04:59AM - Night

Any times falling under these time ranges should return the exact slot .
Pls let me know all the possible ways or formulas to achieve the desired result .I m struggling with the above formula since three months. Thanks in advance..
 
Best supply a workbook, saves us guessing wrongly.
Time in B2:
Code:
=INDEX({"Night";"Morning";"Afternoon";"Evening";"Night"},MATCH(B2,{0;0.208333333333333;0.458333333333333;0.708333333333333;0.916666666666666}))
 
Last edited:
Back
Top