Time Function

maeyks

Board Regular
Joined
Aug 20, 2010
Messages
127
Good pm,

Asking for help. I would like to know how to arrive at a computation wherein:

cell A1 = time IN
cell B1 = time OUT
cell c1 = number that if the times from a1 and b1 will fall between 10 pm to 6 am per hour will return as 1;
a1 = 9 pm
b1= 6 am
c1 = 8

a1 = 6 pm
b1 = 3 am
c1 = 5

condition is that it will start at 10 pm, 10:01 onwards will proceed to 11 pm counting

thanks in advance


Michael
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

Book1
ABCDEF
1
210:00 AM9:57 AM10:01 AM
36:00 PM6:05 PM5:58 PM
48:00:007:57:00
5
Sheet2


Formula in cell D4:
=MEDIAN($B$2,$B$3,D3)-MEDIAN($B$2,$B$3,D2)

Copy cell D4 to E4.
 
Upvote 0
Hello again,

if the entry on cell B2 is 10:00 am, how can I extract the number "10"? to put it on another cell, say C2?
Thanks
 
Upvote 0

Forum statistics

Threads
1,214,912
Messages
6,122,200
Members
449,072
Latest member
DW Draft

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