I am trying to create time attendance sheet for work shift across day with limit time range to check in. The problem is that 23:59 is less than 23:59+0:01 (which is equal 0:00). How can I make the cell has it value as 0:00 which is less than 23:59?

Thank you

`TODAY()`

will return an integer like 43854, meaning the 43854th day since Jan 1, 1900.

`NOW()`

will return a number like 43854.48 which identifies the same day plus 0.48, meaning nearly half a day gone, meaning nearly 12 noon. As the day progresses the decimal will grow until, at midnight, `NOW()`

will be 43855.

Note that Excel will apply a Date or Time or Date/Time format to the cell where you entered the formula. But if you change the format to *Number* you can see the actual cell value. Note that “cell value” and cell display are different. You can enter `=NOW()`

in a cell and apply a format like `hh:mm`

. This would hide all information about the date.

So, you could enter `=TODAY() + Time(23,59,0)`

in cell A1 and apply a format of “dd-mm-yy hh:mm” to see *24-01-20 23:59*. Then, in B1 you enter `=A1+Time(0,1,0)`

. Using the same cell format you would see *25-01-20 00:00*.

Now, if you apply a cell format of “hh:mm” to both cells you would see *23:59* and *00:00* but if you query the result in C1 `= B1>A1`

the result will be *True* because, of course, the value in B1 is larger than the one in A1 by 1 minute.

So, you solve your problem by entering correct TimeValues that include the date and format your cells to display what you want.

Tags: excelexcel