Average with Offsets

montanaaggie

Board Regular
Joined
Nov 11, 2005
Messages
122
Office Version
  1. 365
Platform
  1. Windows
I want to take an average of the last three in a column. The problem is sometimes there are blanks and the equation I am using in multiple tabs is not working. If the cells are not blank the equation works fine
=AVERAGE(OFFSET('Tab 1'!$C$14,COUNT('Tab 1'!$C:$C),0,-3))/1000


In this example when the rows are blank it is average the cells highlighted in yellow. I would like it to be the cells highlighted in blue
1646840275134.png


1646840311414.png
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
That index function didn't work as I only have a column of data and not a table. I tried it with the single column but it errored out.
 
Upvote 0
And why can't you make your range a table? You will probably add data in the future, so using an Excel Table will really be a bonus
This being said, something like
Excel Formula:
=AVERAGE(INDEX(A1:A6,ROWS(A1:A6)-2):INDEX(A1:A6,ROWS(A1:A6)))
works
(adapt range as needed)
 
Upvote 0

Forum statistics

Threads
1,214,984
Messages
6,122,601
Members
449,089
Latest member
Motoracer88

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