2 min readfrom Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

Weird time calculation result

EDIT: I was unable to post an image as the auto-mod deleted it when I included it the first time.

Screenshot

I’m getting a very unusual result from an extremely simple time function, and I cannot for the life of me figure out the issue.

In the image above, both C7 and D7 are set to Time formatting, specifically the “1:30 PM” format in the Format Cells dialog, while the format of E7 is set to Number with a formula of SUM=(D7-C7). It’s just a simple subtraction of hours to determine the timespan, but for some reason instead of getting the results I should (4 hours in this case), I get 0.17.

I’ve done this in two different workbooks, both freshly opened with no changes made other than the cells shown. I’ve checked the full datetime format of the cell’s value, and both cells have the same m/d/y value, the only difference between the two is the hours value. I’m certain this is a really simple oversight on my part, but I cannot figure out what’s causing this or how to correct it, so would appreciate any help.

submitted by /u/VoodooInfinity
[link] [comments]

Want to read more?

Check out the full article on the original site

View original article

Tagged with

#real-time data collaboration
#real-time collaboration
#Excel alternatives for data analysis
#natural language processing for spreadsheets
#generative AI for data analysis
#rows.com
#financial modeling with spreadsheets
#AI formula generation techniques
#Excel compatibility
#formula generator
#Excel alternatives