Sumif/Sumproduct formula to add all expenditure related to a particular item up until the selected month

Edmond_Dantes

New Member
Joined
Nov 25, 2010
Messages
17
Hi guys

Hope someone can help.

I need a formula that will sum all the expenditure related to a particular item up until the end of a month which is selected by the user.

The user will select the month from a dropdown list on a separate worksheet from the data. Say this dropdown lies in B3.

This is what I've got so far:
=SUMIF(Data!M:M,$B15, Data!Y:Y)
=SUMIF(Data!M:M,$B15, Data!Z:Z)
........
=SUMIF(Data!M:M,$B15, Data!AJ:AJ)

Column M in the datasheet contains a list of items, say books, dvds etc.
Column Y in the datasheet contains expenditure for April 2011, Z for May 2011 and so on
The matching item lies in B15, say "books."

I would need a single formula that will calculate all the expenditure for the item "books" up until the end of the month which the user selects.

I hope this is all clear. Any help would be appreciated.
<!-- / message -->
 
Last edited:

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
When you select a month, are you looking for expenditure just in that one month, or for all months up and including that month ?
 
Upvote 0
Hi Gerald. Thanks for the reply.

Because the financial year begins in April and ends in March, if the user had selected May for instance, then I would need expenditure for April up until the end of May.
 
Upvote 0

Forum statistics

Threads
1,224,590
Messages
6,179,750
Members
452,940
Latest member
rootytrip

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