Formula needed for calculating an average based on other cells.

NamssoB

Board Regular
Joined
Jul 8, 2005
Messages
76
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Confusing title, I know...here's what I need:

I have a spreadsheet with a label in Column A, and the data is added each month in the columns to the right. For example:

1683648272656.png


What I want:

Cell A22: The label (Scheduled), then appended to this label is the Average of the last 6 values in that row. So A22 *should* say "Scheduled, 94.5 Avg", A27 should say "Consults, 47 Avg".

Using this formula below, I'm getting the wrong average and can't figure out why. What am I doing wrong on this, OR is there a better way to do this?

=CONCATENATE("Scheduled ",AVERAGE(OFFSET($A$22,0,COUNTA($B$22:$Z$22)-6,1,1)))

Also, what happens when I get more than "Z" columns of data? I can change it to ZZ, but that's temporary. is there an absolute way to just find the last column with data?
 

Attachments

  • 1683648233313.png
    1683648233313.png
    47.5 KB · Views: 7
Yay! Thanks all, there were numerous solutions that worked, although some had some issues with formatting (beyond 1 decimal place for example). In the end, I like the options presented by @Dave Patton.

Question for my own knowledge, what's happening in the Match() function with the 10^35 exponent?

Also for other, using Take(), not super familiar with this!
 
Upvote 0

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Question for my own knowledge, what's happening in the Match() function with the 10^35 exponent?

Also for other, using Take(), not super familiar with this!

Suggestions:
- review the formulas with Formulas Formula Evaluate
- use Excel's help to explain the functions
- search the forum and/or internet for examples and explanations
- try 10^35 in cell It is a very large number that is much larger than the number of columns.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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