+ Reply to Thread
Results 1 to 6 of 6

What is wrong with this SUMIF?

  1. #1
    Forum Contributor
    Join Date
    01-20-2014
    Location
    Greece
    MS-Off Ver
    20 yr. old Excel 2002!
    Posts
    710

    What is wrong with this SUMIF?

    I do not understand why the sumif formula here will not work.

    Can someone explain it to me and what the alternative is?

    Thanks
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,901

    Re: What is wrong with this SUMIF?

    Try this ...

    =SUMIFS($J$5:$J$25,$I$5:$I$25,">="&--("1"&B5&A5),$I$5:$I$25,"<"&EDATE(--("1"&B5&A5),1))

    Or:

    =SUMPRODUCT(--(TEXT($I$5:$I$25,"mmmmyyyy")=$B$5&$A$5),$J$5:$J$25)

  3. #3
    Forum Contributor
    Join Date
    01-20-2014
    Location
    Greece
    MS-Off Ver
    20 yr. old Excel 2002!
    Posts
    710

    Re: What is wrong with this SUMIF?

    I do not have SUMIFS but the second one works! Thanks!

    What is the double minus mean again?

    note: I still do not understand why the formula I wrote won't work...

  4. #4
    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,152

    Re: What is wrong with this SUMIF?

    =SUMIF($I$5:$I$25,AND(YEAR(I5)=$A$5,TEXT(I5,"mmmm")=$B$5),$J$5:$J$25)

    The AND condition simply returns a value OF TRUE which of course does not match your dates

  5. #5
    Forum Contributor
    Join Date
    01-20-2014
    Location
    Greece
    MS-Off Ver
    20 yr. old Excel 2002!
    Posts
    710

    Re: What is wrong with this SUMIF?

    Got it! Thanks!

  6. #6
    Forum Contributor
    Join Date
    01-20-2014
    Location
    Greece
    MS-Off Ver
    20 yr. old Excel 2002!
    Posts
    710

    Re: What is wrong with this SUMIF?

    Can the desired result be accomplished using sum(index where the [--AND(YEAR(I5)=$A$5,TEXT(I5,"mmmm")] is 1? (TRUE converted to 1 by the double negative).

    If yes, how?

+ 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, function picking wrong value
    By nicci113 in forum Excel General
    Replies: 12
    Last Post: 11-20-2014, 01:21 PM
  2. SUMIF shows wrong value
    By psykfall123 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-29-2012, 10:33 AM
  3. [SOLVED] Help with SUMIF using multiple rows - wrong calculation
    By lulugonlolo in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-09-2012, 01:15 AM
  4. sumif formula adding wrong!
    By Daanish in forum Excel General
    Replies: 7
    Last Post: 09-01-2010, 12:36 PM
  5. Sumif Or Am I Using Wrong Formula
    By suzy in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-31-2008, 05:39 PM
  6. Simple SUMIF formula gone wrong!
    By exutable in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-08-2006, 06:58 AM
  7. sumif wrong result
    By tallyman00 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-29-2005, 01:11 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