+ Reply to Thread
Results 1 to 8 of 8

SUMIF with an AND

Hybrid View

  1. #1
    Registered User
    Join Date
    05-23-2014
    Posts
    17

    SUMIF with an AND

    hey,

    I want to write a formula that can search for a date and an area in list of information and the calculate the Qty given


    A B C
    02/06/14 Area1 30
    02/06/14 Area2 25
    02/06/14 Area1 32
    03/06/14 Area2 30
    03/06/14 Area2 30
    03/06/14 Area1 26
    04/06/14 Area1 30
    04/06/14 Area2 30
    etc.

    there are other fields such as different product codes but they aren't important for this search which is the reason the data looks repeated

    can anyone help?

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,040

    Re: SUMIF with an AND

    Instead of SUMIF use SUMIFS formula (for XL 2007+).
    then you can SUM by several criteria.
    Never use Merged Cells in Excel

  3. #3
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: SUMIF with an AND

    If you use Excel>=2007 take a look to SUMIFS function or else to SUMPRODUCT.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  4. #4
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: SUMIF with an AND

    In case you are not familiar with what the first two answers are referring to, this is to show how they can be implemented.

    A
    B
    C
    D
    E
    F
    G
    H
    I
    J
    1
    02/06/2014 Area1
    30
    Date Area
    2
    02/06/2014 Area2
    25
    03/06/2014
    Area2
    3
    02/06/2014 Area1
    32
    4
    03/06/2014 Area2
    30
    Sumifs
    60
    5
    03/06/2014 Area2
    30
    =SUMIFS($C$1:$C$8,$A$1:$A$8,E2,$B$1:$B$8,F2)
    6
    03/06/2014 Area1
    26
    7
    04/06/2014 Area1
    30
    Sumproduct
    60
    8
    04/06/2014
    Area2
    30
    =SUMPRODUCT(--($A$1:$A$8=E2),--($B$1:$B$8=F2),--($C$1:$C$8))
    9
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: SUMIF with an AND

    =SUMPRODUCT(--($A$1:$A$8=E2),--($B$1:$B$8=F2),--($C$1:$C$8))
    No need for the double unary on the sum range:

    =SUMPRODUCT(--($A$1:$A$8=E2),--($B$1:$B$8=F2),$C$1:$C$8)
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  6. #6
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: SUMIF with an AND

    As far as that goes, there isn't a need for the brackets either as you have shown....force of habit.

  7. #7
    Registered User
    Join Date
    05-23-2014
    Posts
    17

    Re: SUMIF with an AND

    thanks the sumifs works a treat

  8. #8
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: SUMIF with an AND

    Thanks for the feedback.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Shorten SUMIF + SUMIF + SUMIF each with same reference range but different criteria???
    By HeyInKy in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-13-2014, 09:25 PM
  2. SUMIF or SUMIF's formula with multiple criteria
    By jackiemariee in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-30-2013, 06:19 PM
  3. SUMIF Question: SUMIF not blank
    By nickyg in forum Excel General
    Replies: 5
    Last Post: 11-18-2009, 10:07 PM
  4. Nested SUMIF statement or multiple SUMIF's
    By Dan27 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-17-2009, 06:55 AM
  5. nested sumif or sumif with two criteria
    By dshigley in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-04-2005, 11:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1