Limiting length of values returned by a formula within the formula itself

Rusty315

Board Regular
Joined
Sep 13, 2012
Messages
54
Hi

I'm using this formula:

=IFERROR("Leadership - Total: "&(SUM(G42:G46))&" Average: "&(AVERAGE(G42:G46)),"Leadership")

It works just fine but the result of the sum and average portions of the formula are very long and I get results that look like this:

Teamwork - Total: 27.3333333333333 Average: 5.466666666667

<tbody>
</tbody>

Formatting the cell won't change the length of these numbers. Is there a way to limit these numbers to 2 or 3 decimal places by changing the formula somehow?

Appreciate any help anyone can give!

Cheers
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Try

Code:
=IFERROR("Leadership - Total: "&(ROUND(SUM(G42:G46),2)&" Average: "&ROUND(AVERAGE(G42:G46),2)
,"Leadership")
 
Upvote 0
Excellent, worked perfectly with a minor adjustment:


=IFERROR("Leadership - Total: "&(ROUND(SUM(G42:G46),2))&" Average: "&ROUND(AVERAGE(G42:G46),2)) ,"Leadership")

Just needed that extra bracket after the 2.

Thanks for your help! It's much appreciated.
</pre>
 
Upvote 0
Pleasure.....thanks for feedback...(y)
 
Upvote 0

Forum statistics

Threads
1,215,076
Messages
6,122,988
Members
449,093
Latest member
Mr Hughes

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