Home » excel » How to display leading zero for minutes from excel time format cell?

How to display leading zero for minutes from excel time format cell?

Posted by: admin May 14, 2020 Leave a comment

Questions:

I have the format 10:05 in cell A1.
I know that with the usage of the minute() function I can get the minutes but if I write the MINUTE(A1) it returns me 5 and not 05.
So what is the best way to get the hour and the minutes including the leading zero?

HOUR(A1) = 10
MINUTE(A1) = 5 (but I want 05)   
How to&Answers:

If you want the cell value to always contain 2 digit minutes,

=RIGHT("0" & MINUTE(A1),2)

will do it

Alternatively if you are happy for the value to be 5 but just want to display 05 you can format the cell to show leading zeros:

In the cell containing =MINUTE(A1) , edit the format (CTRL+1 pc, CMD+1 mac)
and select a custom format of 00

Answer:

1.Right Click on Result Cell

2.Click Format Cell

3.Choose Custom on Left Tab

4.Select 0

5.Type Two 00 in Text box above selections

enter image description here