Excel Query for converting time stamp into morning, afternoon, evening and night

sd28649

New Member
Joined
Apr 26, 2018
Messages
1
I have below excel sheet table and I want to convert the given time stamp into morning, afternoon, evening and night. time between 12 am to 11 am - morning, 12 pm to 3 pm- evening, 4 pm to 8 pm- evening, 9 pm to 11 pm- night. Please suggest

[TABLE="width: 128"]
<colgroup><col width="64" span="2" style="width:48pt"> </colgroup><tbody>[TR]
[TD="class: xl67, width: 64"]Time[/TD]
[TD="class: xl67, width: 64"]Shift[/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]12:00 AM[/TD]
[TD="class: xl65"] [/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]1:00 AM[/TD]
[TD="class: xl65"] [/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]2:00 AM[/TD]
[TD="class: xl65"] [/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]3:00 AM[/TD]
[TD="class: xl65"] [/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]4:00 AM[/TD]
[TD="class: xl65"] [/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]5:00 AM[/TD]
[TD="class: xl65"] [/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]6:00 AM[/TD]
[TD="class: xl65"] [/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]7:00 AM[/TD]
[TD="class: xl65"] [/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]8:00 AM[/TD]
[TD="class: xl65"] [/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]9:00 AM[/TD]
[TD="class: xl65"] [/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]10:00 AM[/TD]
[TD="class: xl65"] [/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]11:00 AM[/TD]
[TD="class: xl65"] [/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]12:00 PM[/TD]
[TD="class: xl65"] [/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]1:00 PM[/TD]
[TD="class: xl65"] [/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]2:00 PM[/TD]
[TD="class: xl65"] [/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]3:00 PM[/TD]
[TD="class: xl65"] [/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]4:00 PM[/TD]
[TD="class: xl65"] [/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]5:00 PM[/TD]
[TD="class: xl65"] [/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]6:00 PM[/TD]
[TD="class: xl65"] [/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]7:00 PM[/TD]
[TD="class: xl65"] [/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]8:00 PM[/TD]
[TD="class: xl65"] [/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]9:00 PM[/TD]
[TD="class: xl65"] [/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]10:00 PM[/TD]
[TD="class: xl65"] [/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]11:00 PM[/TD]
[TD="class: xl65"] [/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

Forum statistics

Threads
1,225,748
Messages
6,186,795
Members
453,371
Latest member
HMX180

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