I have come across this formula to convert time but am unfamiliar with the syntax.
Can someone help decipher this for me?
Thanx
=TEXT(MOD(TEXT(S2,"00\:00")-TEXT(J2,"00\:00"),1),"HHMM")+0
It's for calculating time difference when the times are entered as 4 digit numbers instead of proper times. For example 1615 instead of 16:15
The second and third text functions convert the number to a valid time. The subtraction calculates the difference.
MOD is used so that times which cross midnight are calculated correctly.
The final text function shows the result in the same 4 digit format instead of proper time format.
Adding 0 at the end converts that resulting text string to a proper number.
It's for calculating time difference when the times are entered as 4 digit numbers instead of proper times. For example 1615 instead of 16:15
The second and third text functions convert the number to a valid time. The subtraction calculates the difference.
MOD is used so that times which cross midnight are calculated correctly.
The final text function shows the result in the same 4 digit format instead of proper time format.
Adding 0 at the end converts that resulting text string to a proper number.
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.