Excel 2007 formula sum according to month

F0RE5T

Board Regular
Joined
Nov 4, 2014
Messages
204
Excel 2007 formula required please.

The first row (D1:Z1) has an end of week date (format i.e. 19/11/17, 26/11/17) spread over multiple columns.

Eight rows lower (D10:Z10) is a currency total for that column, i.e. £20.00

I have a field (A5) that allows a month name i.e. Nov to be selected from a dropdown list

What I need to do is select a month (A5) and the currency totals for that month are calculated and placed in A9.

Hopefully that makes sense and any questions please ask, and thanks in advance for any help.

Forest
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Re: Excel 2007 forumal sum according to month

try

=SUMPRODUCT(--(MONTH(D1:Z1)=MONTH("1/"&A5)),D10:Z10)
 
Upvote 0
Re: Excel 2007 forumal sum according to month

try

=SUMPRODUCT(--(MONTH(D1:Z1)=MONTH("1/"&A5)),D10:Z10)

Perfect and many thanks.

Q. what does the "MONTH("1/"&A5)" do?

I will now see how I could calculate how many columns totals were included i.e. 3 weeks had costs and 1 week did not. The value would be put in another cell so separate formula.

You are a star
 
Last edited:
Upvote 0
Re: Excel 2007 forumal sum according to month

Excel 2010
ABCDEFGHIJ
111/19/201711/26/201712/3/201712/10/201712/17/201712/24/201712/31/2017
2434106203286366464144
3329206174441136153320
4238118226401155385173
5Nov 4,139356180165196144460378
6102263335371225310196
7427207401343106437394
8446160290492193385369
9372195191154124358270
102704143519852684144929522244

<tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
B5=SUMPRODUCT((MONTH($D$1:$J$1)=MONTH(A5 & "/1"))*D2:J9)

<tbody>
</tbody>

<tbody>
</tbody>
 
Last edited:
Upvote 0
Re: Excel 2007 forumal sum according to month

Perfect and many thanks.

Q. what does the "MONTH("1/"&A5)" do?

I will now see how I could calculate how many columns totals were included i.e. 3 weeks had costs and 1 week did not. The value would be put in another cell so separate formula.

You are a star

you're welcome

as you've month names in A5, to add 1/ in front of the month name is to trick excel to treat A5 as date rather than text, so that the month() function can work on it
 
Upvote 0
Re: Excel 2007 forumal sum according to month

you're welcome

as you've month names in A5, to add 1/ in front of the month name is to trick excel to treat A5 as date rather than text, so that the month() function can work on it

Thank you for the explanation and help.

Forest
 
Upvote 0
Re: Excel 2007 forumal sum according to month

Hi Many thanks for your effort and answer and I will look at the difference between both answers.

Again many thanks

Forest
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,173
Members
451,543
Latest member
cesymcox

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