+ Reply to Thread
Results 1 to 3 of 3

SUMIF with date & multiple cells

  1. #1
    Registered User
    Join Date
    03-11-2012
    Location
    quebec
    MS-Off Ver
    Excel 2007
    Posts
    2

    Unhappy SUMIF with date & multiple cells

    Hi,

    I have been trying to get the sum of cells that have a date ranging between 1 jan 2012 and 31 jan 2012 only.

    For example:

    A1 = 1 jan 2012, A2 = 1 feb 2012
    B1 = 1, B2 = 2

    I would like to check both A1 and A2, then add the value of only B1 as A2 (so the value of B2) is not between 1 jan 2012 and 31 jan 2012

    This command represents what I want to do
    Please Login or Register  to view this content.
    I wrote 1 to 31 to illustrate the fact I want to check all the day of the months.

    Among all the things I have tried, few worked, but only for 1 cell or 1 date.

    Spent the last 3 hours of my life on this and checked all the post! Please help me!
    Last edited by fiante55; 03-11-2012 at 10:05 PM.

  2. #2
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: SUMIF with date & multiple cells

    Hello fiantee55,

    You can use SUMIF like,

    =SUMIF(A1:A2;">="&A1;B1:B2)-SUMIF(A1:A2;">"&EOMONTH(A1;0);B1:B2)

    Or the below only work XL2007 or later,

    =SUMIFS(B1:B2;A1:A2;">="&A1;A1:A2;"<="&EOMONTH(A1;0))

    Where A1 is the start Date, will calculate it's end date.
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  3. #3
    Registered User
    Join Date
    03-11-2012
    Location
    quebec
    MS-Off Ver
    Excel 2007
    Posts
    2

    Lightbulb Re: SUMIF with date & multiple cells

    Hello Haseeb,

    Thank you very much for your help! I worked my way around your 2 commands and ended up with this one:

    =SOMME.SI('Page 1'!B4:C10;"<="&DATE(2012;1;31);'Page 1'!D4:D26)

    which is
    Please Login or Register  to view this content.
    in english and simpler (in the same page)

    Didn't knew how to use the "<=" with & properly

    Thank you very much again!
    Have a good day.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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