average array across multiple sheets

zakasnak

Active Member
Joined
Sep 21, 2005
Messages
308
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
  2. MacOS
I have this array formula that works perfectly.

Code:
=AVERAGE(IF(N(INDIRECT("'"&$W$4:$W$11&"'!E4"))>0,N(INDIRECT("'"&$W$4:$W$11&"'!E4"))))

My problem is that when I copy this formula thru the thousand or so rows (sorry, 969 rows to be exact), the *row* indicator '!E4 does not update. Is this because it's in quotes?

Is there a way either thru the formula or VBA that I can update this part of the formula for the correct row on every row? I have 969 rows & 8 columns (E, F, G, I, J, L, N & O) to update. Help?
 
Last edited:
Control+shift+enter, not just enter, and copy across...
Code:
=AVERAGE(IF(N(INDIRECT("'"&$W$4:$W$11&"'!"&CELL("address",E4)))>0,
     N(INDIRECT("'"&$W$4:$W$11&"'!"&CELL("address",E4)))))


PERFECT! Thank you so much!
 
Upvote 0

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Forum statistics

Threads
1,223,911
Messages
6,175,335
Members
452,636
Latest member
laura12345

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