I need a specific custom number format that will show me the duration in hours and minutes (with “h” & “m”), but will not show any leading zeros. You can set something like that pretty easily with Custom date and time
Custom date and time
The problem is that this will show me fifteen minutes as “0h 15m” and I would like the number of hours to only show if there is at least one hour. The “0m” can show up if there is some whole number of hours, as this is better for clarity, but I would like the cells to be blank is the value equals 0.
I have found some setting that was advised in a different post:
[<0.0415][m]”m”;[<0.083][h]”h” m”m”;[h]”h” m”m”
And it does hide the hours if the time is less than an hour, but it has two downsides – it doesn’t hide cells with zero values and it doesn’t show the time correctly if it’s negative (it shows “-300m” instead of “-5h”). I have no idea how to make those setting work. Is there someone who would know how to do it?
Mikołaj Gano is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.