+ Reply to Thread
Results 1 to 11 of 11

SUMIFS and Date Criteria (Month Year etc...) but without helper column?

  1. #1
    Forum Contributor
    Join Date
    04-13-2010
    Location
    England
    MS-Off Ver
    Office 2016 365
    Posts
    211

    SUMIFS and Date Criteria (Month Year etc...) but without helper column?

    OK, i have range in a report that sums values on a seperate document dependent on certain criteria.

    Now, i can't have helper columns on the source data because the source document will be overwritten every month.

    My report has a year field and a month field, that increments each month and form the limit for the report, so we want to sum values where the year = the report year and the month is <= the report's month.

    I have a feeling that SUMIFs may be the wrong way to go and SUMPRODUCT may be required, but i have man flu and my brain is refusing to engage with anything beyond remembering my own name....

    The attached is an .xls but i am using Excel 2010.
    Attached Files Attached Files

  2. #2
    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: SUMIFS and Date Criteria (Month Year etc...) but without helper column?

    Why your expected result for year 2012, month=12 and "Me", is 80 ?? B9 = November of 2012. not December.

    =SUMPRODUCT((YEAR($B$5:$B$9)=$H$1)*(MONTH($B$5:$B$9)=$J$1)*($C$5:$C$9=G6)*($A$5:$A$9))
    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.

  3. #3
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    wales
    MS-Off Ver
    Excel 2007
    Posts
    964

    Re: SUMIFS and Date Criteria (Month Year etc...) but without helper column?

    try this

    Please Login or Register  to view this content.
    then drag


    I'm not great with SUMIFS and I couldn't get it to work but this did.

    if anyone can explain how to use SUMIFSfor this id be greatful
    The Importance of INDEX - A GUIDE TO INDEX'S OTHER USES
    <--- If a post helps hit the star

  4. #4
    Forum Contributor
    Join Date
    04-13-2010
    Location
    England
    MS-Off Ver
    Office 2016 365
    Posts
    211

    Re: SUMIFS and Date Criteria (Month Year etc...) but without helper column?

    Quote Originally Posted by Fotis1991 View Post
    Why your expected result for year 2012, month=12 and "Me", is 80 ?? B9 = November of 2012. not December.
    The report is a Year To Date report so the requirement is for the month to be less than or equal to the report month AND the Year to be the same year... will play with your solution though. Thanks!

  5. #5
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    wales
    MS-Off Ver
    Excel 2007
    Posts
    964

    Re: SUMIFS and Date Criteria (Month Year etc...) but without helper column?

    fotis its because he needs if the month is less then the month in question (November before December so 20 + 80)

  6. #6
    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: SUMIFS and Date Criteria (Month Year etc...) but without helper column?

    Ok. I understand. so.

    =SUMPRODUCT((YEAR($B$5:$B$9)=$H$1)*(MONTH($B$5:$B$9)<=$J$1)*($C$5:$C$9=G6)*($A$5:$A$9))

  7. #7
    Forum Contributor
    Join Date
    04-13-2010
    Location
    England
    MS-Off Ver
    Office 2016 365
    Posts
    211

    Re: SUMIFS and Date Criteria (Month Year etc...) but without helper column?

    Thanks twiggy - only problem with that is if there are entries for 2011,2010 etc... (which there will be)...that formula will still sum the value...

  8. #8
    Forum Contributor
    Join Date
    04-13-2010
    Location
    England
    MS-Off Ver
    Office 2016 365
    Posts
    211

    Re: SUMIFS and Date Criteria (Month Year etc...) but without helper column?

    Thanks Fotis - that seems to have cracked it

  9. #9
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    wales
    MS-Off Ver
    Excel 2007
    Posts
    964

    Re: SUMIFS and Date Criteria (Month Year etc...) but without helper column?

    sorry that was my fault I didn't read that correctly the YEAR part. I'm glad you have it sorted though.

  10. #10
    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: SUMIFS and Date Criteria (Month Year etc...) but without helper column?

    You are welcome. Thanks for the reb*.

  11. #11
    Forum Contributor
    Join Date
    04-13-2010
    Location
    England
    MS-Off Ver
    Office 2016 365
    Posts
    211

    Re: SUMIFS and Date Criteria (Month Year etc...) but without helper column?

    I do thanks for the help! If it didn't feel like i am trying to think through a fog bank at the moment i may have got there eventually - although considering my unnatural fear of SUMPRODUCT maybe not!

+ 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