View Single Post
  #17   Report Post  
Posted to microsoft.public.excel.misc
Josh Josh is offline
external usenet poster
 
Posts: 103
Default how to turn decimal hours into hours and minutes?

i tried retyping it exactly as stated far below with the correct cell but
still get an error. are there supposed to be any spaces in there? i don't
know why this is so hard for me to get.

"Fred Smith" wrote:

When I copied your formula into Excel, I couldn't get it accepted. I would
always get a formula error around the "minute" part. When I typed it in, it
worked.

My guess is you have some extraneous unprintable characters somewhere in the
formula. I would try retyping it. It worked for me.

Regards,
Fred

"Josh" wrote in message
...
i can send the file if that would help

"Rick Rothstein (MVP - VB)" wrote:

Click in one of the cells that have your hours in it and select/copy
**everything** in the formula bar (don't retype it for us... select
whatever
is in the formula bar and hit Ctrl+C to copy it into the clipboard) and
then
paste it onto a separate line in a response to this message.

Rick


"Josh" wrote in message
...
i put it in this way and changed to cell to match but still got #
value!. i
tried all the ways listed but none gave a correct value. i know it is
something simple i missed but can't find it.

"Rick Rothstein (MVP - VB)" wrote:

Damn! I forgot about the newsreader breaking lines at spaces. Here is
the
same formula broken so that the newreader won't do that...

=INT(A1)&" hour"&IF(INT(A1)=1," ","s ")&MINUTE(A1/24)&
" minute"&IF(MINUTE(A1/24)=1,"","s")

Rick


"Rick Rothstein (MVP - VB)"
wrote
in
message ...
Although perhaps this would be better...

=INT(A1)&" hour"&IF(INT(A1)=1," ","s ")&MINUTE(A1/24)&"
minute"&IF(MINUTE(A1/24)=1,"","s")

as it properly handles the "s" (plural/single) for when either/both
the
hours and minutes are 1.

Rick


"Rick Rothstein (MVP - VB)"
wrote
in
message ...
I think you can do away with the two string function calls by doing
this...

=INT(A1)&" hours "&MINUTE(A1/24)&" minutes"

Rick


"T. Valko" wrote in message
...
"237 hours 50 minutes". if i can get with text, that would be
great.

A1 = decimal value = 237.83

=INT(A1)&" hours "&RIGHT(TEXT(A1/24,"h:mm"),2)&" mins"

Returns: 237 hours 49 mins

--
Biff
Microsoft Excel MVP


"Josh" wrote in message
...
i want to display my vacation hours as as hours and minutes. right
now
lets
say i have 237.83 displayed. i would like to find a way to
display
this
as
"237 hours 50 minutes". if i can get with text, that would be
great.
if
not,
i can work with that as well.