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.
 

Some videos you may like

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
Welcome to MrExcel.

Just remove the first condition:

=SUMPRODUCT(--($E$2:$AI$2<=H20),($E$13:$AI$13))
 

Watch MrExcel Video

Forum statistics

Threads
1,109,204
Messages
5,527,396
Members
409,759
Latest member
KCH

This Week's Hot Topics

Top