AVERAGE With TEXT Formula Problem

John Caines

Well-known Member
Joined
Aug 28, 2006
Messages
1,155
Office Version
  1. 2019
Platform
  1. Windows
Hello all.
I have a formula which is working for a cell which is;
Code:
=IF(LEN($H$24)=0,"",AVERAGE($H$24:$H$274))
This is ok,, but say it gives me the answer 24.94

What I'm looking to do is in the same cell show some text before this,, so it says;
Avg:24.94

I've tried;
Code:
=IF(LEN($J$24)=0,"","Avg:" ,(AVERAGE($H$24:$H$274)))
This didn't work,,, but can't be too far off.
Can anybody show me please what is wrong?
I just can't quite get it,,, I know its very close,, (I think :-))

Many Thanks
John Caines
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Hi VOG,,
Many thanks for your reply,,
Stange,,,
the answer it gives now is;
Avg: 24.9411764705882

I came across this the other day,,,
I think I have to go into excel options and save the sheet somehow so it doesn't display these long number strings,,,,
Funny why it's done that? Not sure.

Just tried your formula in another cell with the SUM function instead of AVERAGE,, working fine! :-)

Again,, many thanks for this,,, only the & missing,,, so I was almost there hehe,,
Thanks VOG
Best Regards
John Caines
 
Upvote 0
If you want to display to two decimal places try

=IF(LEN($H$24)=0,"","Avg: "&ROUND(AVERAGE($H$24:$H$274),2))
 
Upvote 0
Many thanks again VOG!!
What I just replied,,, I was trying in the excel options,,thinking it was something to do with;
Tools > Options > Calculation
then select "Precision as displayed"

But obviously not!!!:-)
many thanks again,,,
The spreadsheet is looking good.

Thanks for your help VOG,,
Very much appreciated.
All the best
John Caines
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

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