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:
DashYear is 2012, DashMonth is 5. Both of these are fed from a Drop Down list.
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.