How to easily apply formula across more than 1 worksheet?

Special K

Board Regular
Joined
Jun 20, 2011
Messages
83
Office Version
  1. 2010
Platform
  1. Windows
I have the following formula:

=SUM((Sheet1!$E3:$E65535)*(Sheet1!$H3:$H65535=$A$2)*(Sheet1!$I3:$I65535=A7)*(Sheet1!$A3:$A65535>=DATE(2011,ROWS($A$1:A1),1))*(Sheet1!$A3:$A65535<=DATE(2011,ROWS($A$1:A1)+1,0)))

I will need to apply this entire formula to other sheets besides Sheet1 and sum the totals, similar to this:

=SUM(

SUM((Sheet1!$E3:$E65535)*(Sheet1!$H3:$H65535=$A$2)*(Sheet1!$I3:$I65535=A7)*(Sheet1!$A3:$A65535>=DATE(2011,ROWS($A$1:A1),1))*(Sheet1!$A3:$A65535<=DATE(2011,ROWS($A$1:A1)+1,0)))

SUM((Sheet2!$E3:$E65535)*(Sheet2!$H3:$H65535=$A$2)*(Sheet2!$I3:$I65535=A7)*(Sheet2!$A3:$A65535>=DATE(2011,ROWS($A$1:A1),1))*(Sheet2!$A3:$A65535<=DATE(2011,ROWS($A$1:A1)+1,0)))

SUM((Sheet3!$E3:$E65535)*(Sheet3!$H3:$H65535=$A$2)*(Sheet3!$I3:$I65535=A7)*(Sheet3!$A3:$A65535>=DATE(2011,ROWS($A$1:A1),1))*(Sheet3!$A3:$A65535<=DATE(2011,ROWS($A$1:A1)+1,0)))

)

I will need to expand this formula over time as more sheets are added. Also the names of the sheets will not be Sheet1, Sheet2, etc. and will not follow any sort of pattern. Also the formula will be used in each cell of a large table with variations in the DATE ranges.

Is there any way to take the base equation, some sort of FOR loop, and a list of the sheet names to make the implementation easier? That way when a new sheet is added all I have to do is add it to the list of sheets and all of the cells will update their formulas automatically?
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Hi

Considering this topic is also linked to -
http://www.mrexcel.com/forum/showthread.php?t=561350

may I suggest that you clarify your objectives and provide a sample of your data.

I think it is quite possible for you to approach this from another direction and use other functions (eg SUMPRODUCT) to reach your goal.

Also, assuming you are using Excel 2003, does your data really occupy the whole column?

hth
 
Upvote 0

Forum statistics

Threads
1,224,550
Messages
6,179,459
Members
452,915
Latest member
hannnahheileen

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