Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2016-10-27
5
Medium Priority
?
54 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
[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
  • 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 2000 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
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…

660 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