VBA Formula Help - Moving Ranges

jabaker54

New Member
Joined
Sep 24, 2014
Messages
11
Hey guys,

I have this formula to sum multiple tabs and I'm having issues with the moving range part.

The current range I have is R3C9:R4C9. I need this range to add +1 each time its run. For example this range comes out to $I$3:$I$4. I need it to state the following after I run the macro...

1st time: $I$3:$I$4
2nd time: $I$3:$I$5
3rd time: $I$3:$I$6

you get the picture....


This is what I currently have.

Code:
 range("F3").Select
    ActiveCell.FormulaR1C1 = _
     "=SUMPRODUCT(SUMIF(INDIRECT(""'"" & R3C9:R4C9 & ""'!"" & ""M2:M20""),RC[-1],INDIRECT(""'"" & R3C9:R4C9 & ""'!""& ""N2:N29"")))"
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

Forum statistics

Threads
1,216,098
Messages
6,128,812
Members
449,468
Latest member
AGreen17

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