+ Reply to Thread
Results 1 to 12 of 12

How to sumif with criteria

  1. #1
    Forum Contributor
    Join Date
    05-11-2013
    Location
    Mumbai
    MS-Off Ver
    Excel 2007 / 2010
    Posts
    270

    How to sumif with criteria

    Dear Friends,

    PFA the file for your reference.

    I the file, in col. D I need to give the criteria (given in sheet).

    Logic is that if the sumif is 0, then it should give "Sold", else "Not sold".

    eg.
    For B3 and B4, sumif (col E) =0, "Sold"
    For B3 to B6, sumif (col E) =0, "Sold"
    For B3 to B9, sumif (col E) =0, "Sold".

    Is there any formula which can return the desired output ? The database huge. So doing it manually is very time consuming.

    Please assist.
    Attached Files Attached Files

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,872

    Re: How to sumif with criteria

    If I am understanding correctly, this should be in Column D and not Column E.

    Place this in B4 and then copy it down.

    =IF(SUM($B$3:B4)=0,"Sold","Not Sold")
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Contributor
    Join Date
    05-11-2013
    Location
    Mumbai
    MS-Off Ver
    Excel 2007 / 2010
    Posts
    270

    Re: How to sumif with criteria

    Dear alansidman,

    The formula is failing if I am dragging down the formula.
    I am getting the desired output.

    Please assist.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,872

    Re: How to sumif with criteria

    Attached is your file with my formula. Seems to work for me. Returns Sold if the sum is equal to zero.
    Attached Files Attached Files

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,002

    Re: How to sumif with criteria

    You need to explain HOW you get your expected results... as they make no sense to me.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  6. #6
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: How to sumif with criteria

    I am in doubt that there should be more categories other than "arif ce 15000 75" in column E, and sold qty should be equal/or smaller than purchased Qty. Is it possible?
    Does it require FIFO rule? (First in first out)
    Quang PT

  7. #7
    Forum Contributor
    Join Date
    05-11-2013
    Location
    Mumbai
    MS-Off Ver
    Excel 2007 / 2010
    Posts
    270
    Quote Originally Posted by bebo021999 View Post
    I am in doubt that there should be more categories other than "arif ce 15000 75" in column E, and sold qty should be equal/or smaller than purchased Qty. Is it possible?
    Does it require FIFO rule? (First in first out)
    Hi Bebo,
    U are right.
    There will be more catagories.
    Sometimes sold qty might be less than purchase qty also.
    It will also require FIFO rule.

    Please assist.

  8. #8
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: How to sumif with criteria

    Try to add more rows with more categories, qty...and your expected results.

  9. #9
    Forum Contributor
    Join Date
    05-11-2013
    Location
    Mumbai
    MS-Off Ver
    Excel 2007 / 2010
    Posts
    270

    Re: How to sumif with criteria

    Dear Bebo,

    PFA the revised sheet.
    I have added more rows and few more categories.


    Please assist.
    Attached Files Attached Files

  10. #10
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,171

    Re: How to sumif with criteria

    I suggest you should arrange your data as shown in the attached.
    Attached Files Attached Files

  11. #11
    Forum Contributor
    Join Date
    05-11-2013
    Location
    Mumbai
    MS-Off Ver
    Excel 2007 / 2010
    Posts
    270

    Re: How to sumif with criteria

    Hi John,
    I wish I could.
    This data is system generated.

    Please assist.

  12. #12
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,171

    Re: How to sumif with criteria

    The only option I can offer is to use the columns I created as "helper" columns as you need to process the data by item type.

+ 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] Sumif two different criteria
    By edae00 in forum Excel General
    Replies: 6
    Last Post: 02-06-2016, 08:43 AM
  2. [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
  3. [SOLVED] Multiple Criteria SUMIF Using Column as Negative Criteria
    By freybe06 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-24-2014, 04:46 PM
  4. 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
  5. SumIf using date criteria range and one other criteria
    By DJTMONEY in forum Excel General
    Replies: 1
    Last Post: 04-20-2010, 04:10 PM
  6. SUMIF with multiple criteria, one criteria a specific string
    By Weasel in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-03-2008, 05:32 PM
  7. 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