Solved

SUMIF to sum quarter instead of month.

Posted on 2013-06-15
2
612 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

734 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