Discussion Error subtracting times in Excel
https://techcommunity.microsoft.com/t5/excel/error-subtracting-times/m-p/2383040#M101101
<P>I am attempting to subtract times from one another to figure out how long something took. So Why do i get a value error when i try to subtract simple times from each other? (error says: A value used in the formula is of the wrong data type.) stranger still it only sometimes seems to do it because i was able to setup the first two lines (after playing with them for a bit they had same issue no idea how they fixed themselfs) (see picture)</P><P>Now all the error cell is doing is this: =B4-C4 (did not matter if i use auto sum or add ( ) )</P><P>yet it displays a error value. It does not seem to matter how i have these cells formatted (what time format is used)</P><P>What could i be doing wrong?</P><P> </P>Tue, 25 May 2021 10:15:16 GMTsoulzchaos2021-05-25T10:15:16ZError subtracting times
https://techcommunity.microsoft.com/t5/excel/error-subtracting-times/m-p/2383040#M101101
<P>I am attempting to subtract times from one another to figure out how long something took. So Why do i get a value error when i try to subtract simple times from each other? (error says: A value used in the formula is of the wrong data type.) stranger still it only sometimes seems to do it because i was able to setup the first two lines (after playing with them for a bit they had same issue no idea how they fixed themselfs) (see picture)</P><P>Now all the error cell is doing is this: =B4-C4 (did not matter if i use auto sum or add ( ) )</P><P>yet it displays a error value. It does not seem to matter how i have these cells formatted (what time format is used)</P><P>What could i be doing wrong?</P><P> </P>Tue, 25 May 2021 10:15:16 GMThttps://techcommunity.microsoft.com/t5/excel/error-subtracting-times/m-p/2383040#M101101soulzchaos2021-05-25T10:15:16ZRe: Error subtracting times
https://techcommunity.microsoft.com/t5/excel/error-subtracting-times/m-p/2383074#M101104
<P><LI-USER uid="1062485"></LI-USER> </P>
<P>The values in the Time Arrived and Time Out columns are left-aligned. This is usually a sign that Excel sees the values as text, not as real times. Insert a space between the time and the am/pm indication:</P>
<P> </P>
<P>11:00 am</P>
<P>4:00 pm</P>
<P> </P>
<P>Also, use =C4-B4 instead of =B4-C4.</P>
<P>If there is a chance that Time Out will be after midnight, use =MOD(C4-B4,1)</P>Tue, 25 May 2021 10:27:58 GMThttps://techcommunity.microsoft.com/t5/excel/error-subtracting-times/m-p/2383074#M101104Hans Vogelaar2021-05-25T10:27:58ZRe: Error subtracting times
https://techcommunity.microsoft.com/t5/excel/error-subtracting-times/m-p/2383140#M101109
Ohhhh adding a space. that worked perfectly thanks for your assistanceTue, 25 May 2021 10:47:42 GMThttps://techcommunity.microsoft.com/t5/excel/error-subtracting-times/m-p/2383140#M101109soulzchaos2021-05-25T10:47:42Z