Solved

How can I use SUMIF to find the data from previous week?

Posted on 2016-10-27
5
21 Views
Last Modified: 2016-10-27
Example Dataset attached. How can I use SUMIF to find the number from column B from the previous week which is A2-7?
Example.xls
0
Comment
Question by:Ryan Simmons
  • 2
  • 2
5 Comments
 
LVL 23

Expert Comment

by:NBVC
ID: 41862712
You have a formula there that seems to be the correct one based on your question.

Why do you think it is not working?  Apr 2, 2016 shows up multiple times in column A so you are getting a sum of all those times.
0
 

Author Comment

by:Ryan Simmons
ID: 41862740
Ah... you are right. So how can I get the SUMIF to accept a second criteria? Basically there are stores and I only need the demand for one store for previous week. Second example attached.
Example-2.xls
0
 
LVL 23

Accepted Solution

by:
NBVC earned 500 total points
ID: 41862747
You can use SUMIFS

e.g.

=SUMIFS(C:C,A:A,A2,B:B,B2-7)

notice the range to sum is at the front now...followed by the criteria ranges and criterias
0
 
LVL 5

Expert Comment

by:Yamaafg
ID: 41862773
Hi, try below array formula, remember to press Ctrl+shift+enter

=SUM(IF(($A$2:$A2>=($A2-6))*($A$2:$A2<=$A2), $B$2:$B2, 0))
0
 

Author Closing Comment

by:Ryan Simmons
ID: 41862781
Perfect, ty!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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 …
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
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…

867 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

23 Experts available now in Live!

Get 1:1 Help Now