+ Reply to Thread
Results 1 to 5 of 5

Sumif and SumProduct

Hybrid View

  1. #1
    Registered User
    Join Date
    11-17-2011
    Location
    Shropshire
    MS-Off Ver
    Excel version 2102
    Posts
    85

    Wink Sumif and SumProduct

    Hi,

    I've a list of dates and basically i need to add up column B if Column A is between two dates.

    ie i need to know totals for April through to March.

    On the attachment
    Column A is the date
    Column B is a number

    Column S has the start date
    Colum T has the end date


    Column U has a sumif formula (it seems to work but does not add up correctly for May, June August)
    Column W has a sumproduct formula (it seems to work but does not add up correctly for May, June August)
    Column V has a simple manual sum but is very labour intensive.

    Please could someone help and let me know why my sumif and sumproduct does not work.

    thanks in advance.
    Attached Files Attached Files

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Sumif and SumProduct

    Your formulas would be OK if you had just dates in column A but you have times in there too so you have to amend a little to cope with those, try this version with SUMIFS for an accurate result

    =SUMIFS(Sheet1!B:B,Sheet1!A:A,">="&S15,Sheet1!A:A,"<"&T15+1)
    Audere est facere

  3. #3
    Registered User
    Join Date
    11-17-2011
    Location
    Shropshire
    MS-Off Ver
    Excel version 2102
    Posts
    85

    Re: Sumif and SumProduct

    Daddylonglegs - this works fantanstic.

    Thanks for everyones help.
    x


    Quote Originally Posted by daddylonglegs View Post
    Your formulas would be OK if you had just dates in column A but you have times in there too so you have to amend a little to cope with those, try this version with SUMIFS for an accurate result

    =SUMIFS(Sheet1!B:B,Sheet1!A:A,">="&S15,Sheet1!A:A,"<"&T15+1)

  4. #4
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,464

    Re: Sumif and SumProduct

    Your formula are ok, but you do not have any data between 01/04/2010 and 30/11/2010 ( and other intervals) - Therefore the formula rturns 0 as it should

  5. #5
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Sumif and SumProduct

    hi Littlefoot. as dates are actually numbers, you'll realise some don't fit in the criteria because of time added in it. if you format 31-May-11 to General format for eg, you'll see it as 40694. but if you format A95, you'll see 40694.5913541667

    that will cause your criteria to fail because you stated less than 31 May 2011 (i.e. 40694). you also dont need Column B. just do a COUNTIF
    =COUNTIF(Sheet1!A:A,">="&S15)-COUNTIF(Sheet1!A:A,">"&T15+1)
    =SUMPRODUCT(--(Sheet1!A:A>=S15),--(Sheet1!A:A<T15+1))
    Last edited by benishiryo; 10-30-2012 at 11:35 AM.

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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