Formatting combined text and formulas

Copper Contributor

I have a spreadsheet for calculating total hours worked, and am using a combined text/formula formula to create the following result:

Total
 Hrs  

4.506 / 72

But I want to limit my formula result to 2 decimal places. I have seen examples on how to format the output as hh:mm and as %,  but not just 2 decimal places.

My formula is:

="Total
Hrs "

&(SUM(J2:J100,"0.00"))&" / "&((COUNTIF(L2:L100,1))*8)

and I thought the "0.00" would set the output format, but it doesn't have any effect.

 

What am I missing?

1 Reply
Sorry, I didn't spend enough time experimenting before I posted a question; but perhaps this will help someone else.

The correct formula is
="Total
Hrs "
&(TEXT(SUM(J2:J100),"0.00")&" / "&((COUNTIF(L2:L100,1))*8))
and produces
"Total
Hrs 4.51 / 72"
which is what I wanted all along.