Help with SUMPRODUCT formula

Kyroc

New Member
Joined
Sep 9, 2014
Messages
7
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.
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

Forum statistics

Threads
1,214,651
Messages
6,120,744
Members
448,989
Latest member
mariah3

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