0
votes

I have a cell that includes a drop down list of months for a user to select from. What I would like to do is use whatever month is selected in the drop down to drive sums in the workbook.

For example, in one sheet I have the the drop down list of months in C4.

In another sheet I have dates and corresponding data (starting in A1 and A2):

July  August  September  October  etc...      YTD Total
50    100     75         60       etc...      ?

So what I'm looking to achieve here is to sum the monthly figures up to the date selected in the drop down menu by the user, i.e. if September is selected in the drop down - then the YTD total will include July, August, September (NB - financial year starts in July, not Jan).

Thanks in advance people.

1
have you tried using =sumif(...) ?Dan
Would need a bit more info on your data format and required outputs, but everything you're asking for should be feasible with SUMIFS and suitable formatting.Michael

1 Answers

0
votes

Using INDIRECT you can create the range reference for the SUM from a string. Something like this:

=SUM(INDIRECT("R2C1:R2C"&MATCH(C4,A1:E1,0),FALSE))