# #" Days" ?/?" Hours"

#### Special-K

##### Board Regular
My results aren't displaying the way I had hoped ...
So, perhaps a kind-hearted Excel expert can guide me to a solution?

=SUM(AE6/G111+AG6)

And the formatting of the cell is:
CUSTOM formatting
#" Days" ?/?" Hours"

Now this is how it's displaying:
Say the calculation AE6/G111= 1 .... and the fraction in cell AG6=0
Then my result will show:
1 [ SPACE ] Hours

BUT ... (with the same calculation) ... say the calculation AE6/G111= 1 ... and the fraction in cell AG6=1/2
Then my result will show:
1 Days 1/2 Hours

Do I not have something formatted properly?
How can I get the result to always read properly even if the result equals ZERO?
i.e.
0 DAYS 0 Hours
0 DAYS 3/4 Hours
1 DAYS 0 Hours

Cheers!

### Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},\$Z\$1:\$Z\$99,\$Y\$1:\$Y\$99),2,False) to lookup Y values to left of Z values.

#### agihcam

##### Well-known Member
there might be better way;
Code:
``=IF(AG6=0,SUM(AE6/G111)&" "&"Days"&" "&AG6&" "&"Hrs",IF(SUM(AE6/G111)=0,SUM(AE6/G111)&" "&"Days"&" "&AG6&" "&"Hrs",SUM(AE6/G111+AG6)))``

#### Special-K

##### Board Regular
It works ... but wow ... that's a fairly confusing formula to follow.

How would I adapt it to the formula below?
=SUM(AC12/G111-E107)

I tried ... but unsuccessfully.

#### agihcam

##### Well-known Member
try;
Code:
``=IF(E107=0,SUM(AC12/G111)&" "&"Days"&" "&E107&" "&"Hrs",IF(SUM(AC12/G111)=0,SUM(AC12/G111)&" "&"Days"&" "&E107&" "&"Hrs",SUM(AC12/G111-E107)))``

Replies
2
Views
120
Replies
1
Views
213
Replies
4
Views
59
Replies
5
Views
127
Replies
4
Views
993

1,147,498
Messages
5,741,505
Members
423,663
Latest member
kaveh87rsh

### 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.

### Which adblocker are you using?

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

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