Could someone please tell me how to write a formula for this that works, I believe it should be a sumproduct formula but I can't get my head around it. I have never used a sumproduct formula before.
I have a row of numbers 1 to 31 representing days of the month.
Underneath I have a figure representing revenue for each day of the month.
In another cell I have a drop down box with the numbers 1 to 31 also representing days of the month.
I need a formula that will look at what number is selected in the drop down box and will sum the revenue for each day up to and including that day.
So for example I have revenue for every day for 31 days, however I want the total revenue I had reached on day 13 of the month, so I select day 13 from the drop down box and the formula should show me total revenue from day 1 to 13.
=SUMPRODUCT(--($E$2:$AI$2=H20),--($E$2:$AI$2<=H20),--($E$13:$AI$13))
This is the formula I was using. E2:AI2 represent the 1 to 31 days of the month. H20 is the cell of the drop down box where you select the day of the month and E13:AI13 is the row of revenue.
The formula above just displays the value of revenue for the date selected instead of summing the revenue from day 1 until the day selected.
Any help would be appreciated.
I have a row of numbers 1 to 31 representing days of the month.
Underneath I have a figure representing revenue for each day of the month.
In another cell I have a drop down box with the numbers 1 to 31 also representing days of the month.
I need a formula that will look at what number is selected in the drop down box and will sum the revenue for each day up to and including that day.
So for example I have revenue for every day for 31 days, however I want the total revenue I had reached on day 13 of the month, so I select day 13 from the drop down box and the formula should show me total revenue from day 1 to 13.
=SUMPRODUCT(--($E$2:$AI$2=H20),--($E$2:$AI$2<=H20),--($E$13:$AI$13))
This is the formula I was using. E2:AI2 represent the 1 to 31 days of the month. H20 is the cell of the drop down box where you select the day of the month and E13:AI13 is the row of revenue.
The formula above just displays the value of revenue for the date selected instead of summing the revenue from day 1 until the day selected.
Any help would be appreciated.