Format for hours

MakezHD

New Member
Joined
Jul 28, 2018
Messages
4
I want to introduce a number with COMMAS for decimals and I want excel to add "hours".

For example, if I introduce 6 in a cell I want to see 6 hours or 6,00 hours, I don't care. Or if I introduce 6,43 I want to see 6,43 hours.

Which format should I use to get that? Thanks!
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
maybe custom format: #.### "hours"

but 1 will be as 1 hours and 6 as 6 hours
 
Last edited:
Upvote 0
Upvote 0
I need it to be with commas, I mean, 5/2 is 2,5 not 2.5
Not working for me, maybe because my Windows is set up to place , instead of . for decimals?
Does this Custom Format work for you...

[=1]# "hour";#.## "hours"

Note: While a value of 1 is displayed as "1 hour", any other whole number of hours will be displayed with a decimal point (hopefully, the decimal point will be a comma on your system); so, a value of 2 will be displayed as "2. hours" (I don't know how to suppress the decimal point in a Custom Format, but I do know how to do it using VB event code).
 
Upvote 0
If "hours" is not showing up with the custom format @" Hours" try copying the bold, red part of this sentence and paste it into the custom format box.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top