Excel Date Calculation Function New

Thasthahir

New Member
Joined
Mar 6, 2018
Messages
9
Hi There,

I have Some times ("hh:mm:ss") format in A column. In B column Have added a formula. It means i have added 8 hours based on A column data. B Column Formula : (=A2+time(8,0,0)).

Requirement:

A column time will not cross after 8 hours. If it will cross After * hours Column should be update Time Crossed commend.

IF not C column will show remaining time compare to current Time.

If current system time
22:00:00
A B C D E
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Time[/TD]
[TD]+8 Hours[/TD]
[TD]System Current time[/TD]
[TD]Remaining time[/TD]
[TD]Remaining time[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]13:05:20[/TD]
[TD]21:05:20[/TD]
[TD]=Now() (Time Format)[/TD]
[TD]=C1-BB[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]15:00:00[/TD]
[TD]23:00:00[/TD]
[TD] =Now() (Time Format)[/TD]
[TD]=C2-B2[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]12:00:00[/TD]
[TD]20:00:00[/TD]
[TD] =Now() (Time Format)[/TD]
[TD]=C3-B3[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


Note: In D column Timer will be show the time if 8 hours is not crossed. If 8 hours crossed it will be show " Time Crossed"

Regards,
Mohideen Thasthahir
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[/TR]
</tbody>[/TABLE]

 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Hi Mohideen,

I am not 100% sure I understood exactly what you were looking for so I came up with this…




In column A: a time value entered by the user with the format “h:mm:ss”



In column B: add 8 hours to column A à =A2+TIME(8,0,0)



In column C: current time à =TEXT(NOW(),"h:mm:ss")



In column D: column B minus column C à =IF(B2-C2>0,TEXT(B2-C2,"h:mm:ss"),TEXT(ABS(B2-C2),"-h:mm:ss"))



In column E: indicate if column B is in the past à =IF(B2-C2<0,"time crossed",TEXT(B2-C2,"h:mm:ss"))



I hope that helps,



Doug



ps: time calculations in Excel do not come easy for me so there are probably more elegant ways to do this
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,326
Members
452,635
Latest member
laura12345

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