Sum a slice of a named range?

LostInDaJungle

New Member
Joined
Feb 27, 2012
Messages
47
So, I have a table that has the monthly sales in one column and the sales budgets in another column. Since monthly sales is a running total, it's easy to calculate current YTD. Sales Budgets is another thing entirely. We have Sales Budgets pre-written through December.

What I need is to be able to sum an array slice. SUM(myArray[1-5]) That way I could have the YTD budgets for the current month. How can I sum the first n members of a named range?

Budgets are in a named array called 'SalesBudgets_2012'

A single month's budget is retrievable with:
Code:
=INDEX(INDIRECT("SalesBudgets_" & DashYear),DashMonth)

DashYear is 2012, DashMonth is 5. Both of these are fed from a Drop Down list.
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Try the offset function

Offset(array,#rows,#cols,Height,Width)

If this returns the 1st cell you want in the sum
=INDEX(INDIRECT("SalesBudgets_" & DashYear),DashMonth)

Then this will sum a 5 cell verticle range beginning with that cell.
=SUM(OFFSET(INDEX(INDIRECT("SalesBudgets_" & DashYear),DashMonth),0,0,5,1))
 
Upvote 0

Forum statistics

Threads
1,215,521
Messages
6,125,305
Members
449,218
Latest member
Excel Master

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