I have two fields in my Google Sheets spreadsheet and a third cell that subtracts the difference between them. Most of the time it works fine but sometimes it fails.
The way it fails is I believe that it interprets the time of one cell as a different day than the time of the next cell. IIRC it seems to have problems when going from AM to PM. Again, most of the time it works.
The formula is:
=(D:D-C:C)*24
The value in cell one and cell two that break it (it is 14:19 when I enter it):
C | D | =(D:D-C:C)*24 |
---|---|---|
10:00 | 12:00 | 2 |
1:15 | 2:15 | 22 |
When I try to fix it, and enter the 24hr time, it stays stuck.
My question is, what do I do to fix this?
If Google Sheets thinks that time entered is from the previous day or from the next day, is there a way to enter the correct day or time into the time field?
OR is this a known issue and I need to redo my formula?
I remember reading that you can make a field (a cell) of a certain type. How do I know what type the cell is currently? I looked in Google Sheets and it doesn't say it anywhere. Would that prevent this issue.
If I enter the full date and time into the field the formula field throws an error "#VALUE".
UPDATE:
So I edited my formula and removed the *24 part of it and now it's showing the correct time difference for the fields that were broken.
=(D:D-C:C)
IIRC someone said I needed format my C and D columns so that it all works. Maybe that has something to do with it but I can't find any information about the type of a cell!
Usually, if you have an option selected out of multiple options there's a checkmark next to the selected option. In Google Sheets there there's nothing selected: