Solved

SUMIF to sum quarter instead of month.

Posted on 2013-06-15
2
560 Views
Last Modified: 2013-06-16
I got this code from here earlier today but now I need to modify it to do the same thing but sum my data by quarter instead of month & year. I have my quarters formatted to Q1-13. I want it to match the value in cell C49 instead of C18 as shown in the code below.


=SUMIFS(Database!$V:$V,Database!$H:$H$,$A$10,Database!$AP:$AP,$B19,Database!$C:$C,">="&EOMONTH(C$18,-1)+1,Database!$C:$C,"<"&EOMONTH(C$18,0)+1)

Open in new window


Modified post...I also need to do the same thing for a year as well in a separate formula.
0
Comment
Question by:Lawrence Salvucci
2 Comments
 
LVL 50

Accepted Solution

by:
barry houdini earned 500 total points
ID: 39251021
It would probably be simpler just to list the start and end dates, so if you want 1st April to 30th June 2013 just list those two dates in C49 and D49 and use this formula in E49

=SUMIFS(Database!$V:$V,Database!$H:$H$,$A$10,Database!$AP:$AP,$B19,Database!$C:$C,">="&C49,Database!$C:$C,"<="&D49)

You can then do the same for the year by putting 1st Jan in one cell and 31st December in another

If you want to calculate directly from Q1-13 that will make the formulas more complex.....but it can be done if you want, e.g. with Q1-13 or similar in C49 that could be

=SUMIFS(Database!$V:$V,Database!$H:$H$,$A$10,Database!$AP:$AP,$B19,Database!$C:$C,">="&MID(C49,2,1)*3-2&"/1/"&RIGHT(C49,2),Database!$C:$C,"<"&MID(C49,2,1)*3+1&"/1/"&RIGHT(C49,2))

or for the whole year with year like 2012 in C50 try

=SUMIFS(Database!$V:$V,Database!$H:$H$,$A$10,Database!$AP:$AP,$B19,Database!$C:$C,">=1/1/"&C50,Database!$C:$C,"<1/1/"&C50+1)

I'm assuming you are using US regional settings for those latter two formulas....

regards, barry
0
 
LVL 1

Author Closing Comment

by:Lawrence Salvucci
ID: 39251379
Thanks Barry! Appreciate your help again!
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question