Gates Is Antichrist
Well-known Member
- Joined
- Aug 15, 2002
- Messages
- 1,961
This will sound like a lot but it goes fast. In a fresh sheet:
Type 23:35 in A1
Type 23:45 in A2
Type 23:55 in A3
Type 0:05 in A4
They should appear just like typed, i.e. custom format h:mm . If not, make them so. Now I want durations so I'll gamble on simple cell subtraction. So B2=A2-A1
and copy to B3 and B4. Naturally, B4 is bogus, so change it to B4=24+A4-A3.
Now you see what looks like 0:10 in all cells in column B (format it the same as column A if your XL version didn't already). If you formatted all column B to h:mm AM/PM they'd all appear as 12:10:00 AM
Now the fun begins. Guess what would be AVERAGE(B2:B3)? AVERAGE(B2:B4)? Answer is at bottom in case you want to challenge yourself.
In either format you'll see a seemingly bizarre answer for AVERAGE(B2:B4).
In fact, the only solution I've found to this seeming anomaly is to use MINUTE(AVERAGE(B2:B4)) instead.
However I lose the nice colon that way (and appropriate expression of 70 minutes if that duration occurred)
Not only that, MINUTE(A2-A1) shows 0:00!
I guess the problem is that time really represents seconds since some point like 1904 or 1970, and that I'm really only seeing modulus. Ah, but if that were true, why does A4-A3 garbage out? Further confusing things is that the "seconds since 19XX" line would suggest that my formula only added 24 SECONDS to A4; but indeed it added 24 hours. (Or did it? Formatting the average as h:mm suggests it added 48!!)
Anyhowwww...I'd like the duration between times in column B, but keep time format. What's the trick I'm missing? Any sage perspective on the contradictions I sensed, or flaws in my remarks?
(average of B2:B3 shows 0:10 or 12:10AM; B2:B4 shows 16:10 or 4:10PM)
Type 23:35 in A1
Type 23:45 in A2
Type 23:55 in A3
Type 0:05 in A4
They should appear just like typed, i.e. custom format h:mm . If not, make them so. Now I want durations so I'll gamble on simple cell subtraction. So B2=A2-A1
and copy to B3 and B4. Naturally, B4 is bogus, so change it to B4=24+A4-A3.
Now you see what looks like 0:10 in all cells in column B (format it the same as column A if your XL version didn't already). If you formatted all column B to h:mm AM/PM they'd all appear as 12:10:00 AM
Now the fun begins. Guess what would be AVERAGE(B2:B3)? AVERAGE(B2:B4)? Answer is at bottom in case you want to challenge yourself.
In either format you'll see a seemingly bizarre answer for AVERAGE(B2:B4).
In fact, the only solution I've found to this seeming anomaly is to use MINUTE(AVERAGE(B2:B4)) instead.
However I lose the nice colon that way (and appropriate expression of 70 minutes if that duration occurred)
Not only that, MINUTE(A2-A1) shows 0:00!
I guess the problem is that time really represents seconds since some point like 1904 or 1970, and that I'm really only seeing modulus. Ah, but if that were true, why does A4-A3 garbage out? Further confusing things is that the "seconds since 19XX" line would suggest that my formula only added 24 SECONDS to A4; but indeed it added 24 hours. (Or did it? Formatting the average as h:mm suggests it added 48!!)
Anyhowwww...I'd like the duration between times in column B, but keep time format. What's the trick I'm missing? Any sage perspective on the contradictions I sensed, or flaws in my remarks?
(average of B2:B3 shows 0:10 or 12:10AM; B2:B4 shows 16:10 or 4:10PM)