Solved

SUMIF to sum quarter instead of month.

Posted on 2013-06-15
2
504 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

708 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now