ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Format question (https://www.excelbanter.com/excel-discussion-misc-queries/179267-format-question.html)

Richard

Format question
 
Whenever I use this formula to show days, it returns a string of decimal
places like 3.66666666 days. I would like for it to show something like 3
days 6 hours. Here is the formula I'm using =SUM(G:G)/L1&"Days" Thanks in
advance!!!

Sean Timmons

Format question
 
You could do =INT(sum(G:G)/L1)&" Days "&(sum(G:G)/L1-INT(sum(G:G)/L1))*24&"
Hours.

..66667 days is more like 16 hours...

"Richard" wrote:

Whenever I use this formula to show days, it returns a string of decimal
places like 3.66666666 days. I would like for it to show something like 3
days 6 hours. Here is the formula I'm using =SUM(G:G)/L1&"Days" Thanks in
advance!!!


Bob Phillips

Format question
 
=INT(SUM(G:G)/L1)&" Days "&TEXT(MOD(SUM(G:G)/L1,1),"hh") &" hours"

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Richard" wrote in message
...
Whenever I use this formula to show days, it returns a string of decimal
places like 3.66666666 days. I would like for it to show something like 3
days 6 hours. Here is the formula I'm using =SUM(G:G)/L1&"Days" Thanks in
advance!!!




Bob Phillips

Format question
 
If it will always be less than 31 days you could also use

=TEXT(SUM(G:G)/L1,"d ""Days ""h ""hours""")

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Richard" wrote in message
...
Whenever I use this formula to show days, it returns a string of decimal
places like 3.66666666 days. I would like for it to show something like 3
days 6 hours. Here is the formula I'm using =SUM(G:G)/L1&"Days" Thanks in
advance!!!





All times are GMT +1. The time now is 08:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com