[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

SUMIF to sum quarter instead of month.

Posted on 2013-06-15
2
Medium Priority
?
786 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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

829 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