How to sum data for YTD (range of date)?

xinyan1129

New Member
Joined
Feb 22, 2017
Messages
11
Hi,

My company financial year is May - Apr (subsequent year). Please refer case below, I have 2 sheets of data. For the budget column (E5), what sumproduct formula should I use to calculate that with criterias (month May-17 to Jan-18 (sheet 1, B1 to C1) and with channel (sheet 1, A5).

I use formula =SUMPRODUCT((YEAR('sheet 2'!$A$2:$A$26)<=YEAR($C$1))*(MONTH('sheet 2'!$A$2:$A$26)<=MONTH($C$13))*('sheet2'!$D$2:$D$26="BOOKSTORE")*('sheet2'!$B$2:$B$26)) but result is not accurate. Anyone can help?

Sheet 1
ABCDEFG
1YTDMay-17Jan-18
2
3Budget
4Sales ChannelGross SalesReturnNet SalesGross SalesReturnNet Sales
5Bookstore 312,045 (24,258) 287,787 - - -
6School 12,056 (102) 11,954 - - -
7
8Total Net Sales324,101 (24,360)299,741000
Sheet 2
ABCDEFG
1Gross SalesReturn
2May-17 30,508 (7,627)BOOKSTORE
3May-17 - - SCHOOL
4Jun-17 44,411 (11,103)BOOKSTORE
5Jun-17 - - SCHOOL
6Jul-17 38,924 (9,731)BOOKSTORE
7Jul-17 - - SCHOOL
9Aug-17 35,473 (8,868)BOOKSTORE
10Aug-17 - - SCHOOL
11Sep-17 38,992 (9,748)BOOKSTORE
12Sep-17 - - SCHOOL
13Oct-17 39,146 (9,786)BOOKSTORE
14Oct-17 - - SCHOOL
15Nov-17 44,804 (11,201)BOOKSTORE
16Nov-17 - - SCHOOL
17Dec-17 42,230 (10,557)BOOKSTORE
18Dec-17 - - SCHOOL
19Jan-18 42,727 (10,682)BOOKSTORE
20Jan-18 16,171 (4,851)SCHOOL
21Feb-18 42,968 (10,742)BOOKSTORE
22Feb-18 - - SCHOOL
23Mar-18 40,796 (10,199)BOOKSTORE
24Mar-18 13,831 (4,149)SCHOOL
25Apr-18 46,351 (11,588)BOOKSTORE
26Apr-18 - - SCHOOL

<colgroup><col><col span="7"></colgroup><tbody>
</tbody>
 
Last edited:

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Which version of excel? If 2007 or later you can try this:

=SUMIFS(Sheet2!B:B,Sheet2!$D:$D,$A5,Sheet2!$A:$A,">="&$B$1,Sheet2!$A:$A,"<="&$C$1)

I presume the numbers in the first table are incorrect?
 
Upvote 0

Forum statistics

Threads
1,215,351
Messages
6,124,445
Members
449,160
Latest member
nikijon

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