Forum

Notifications
Clear all

Convert number to hour format

5 Posts
3 Users
0 Reactions
155 Views
(@usb)
Posts: 244
Honorable Member
Topic starter
 
Hi, I have attached an excel file
I want to set in it that I will type the time 809 and 
it will translate it to 08:09 time format with text functions.
Thank you for your help and reply to the file.
Thank you very much!!! Leah
 
Posted : 23/02/2023 3:25 am
(@jstewart)
Posts: 216
Estimable Member
 

Like this?

 
Posted : 23/02/2023 12:07 pm
(@usb)
Posts: 244
Honorable Member
Topic starter
 
Hi, the formula you gave me here helps me a lot.
Now in the hours I type 0018 and it is received like this - :18
How can you set it to be written 00:18?
 
Posted : 14/06/2023 6:28 pm
Riny van Eekelen
(@riny)
Posts: 1195
Member Moderator
 

When you enter 0018 in a 'General' formatted cell, Excel ignores the leading zeroes. In such a case, the formula joins an empty string with ":18"

Knowing that these type of entries may occur, format columns B and D as text first. Then enter 0018 and Excel will not remove the leading zeroes.

 
Posted : 15/06/2023 2:03 am
(@jstewart)
Posts: 216
Estimable Member
 

It might be easier to do as Riny suggested, but I just added an "IF" clause at the beginning of my original formula. If the LEN of the number is less than 4 use 0 otherwise use the LEFT numbers. Whichever works best for you. 🙂

 
Posted : 15/06/2023 11:01 am
Share: