+ Reply to Thread
Results 1 to 6 of 6

Formula MalFunction

  1. #1
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Formula MalFunction

    Hello;

    Please refer to attached file.
    I am seeing issue with SUMIFS formula.
    Cell G2 is 17 so Row 3 is all for year 2017.
    And data i am seeing for Oct17 is correct.
    Now change G2 to 18.
    P3 will change to Oct18 and even then the value in column P does not change to zero as it should since i dont
    have any data in column A for Oct18.
    Let me know if you have any questions.
    Thanks.
    Riz
    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: Formula MalFunction

    Hello Riz,

    It works for me - if I change G2 to 18 then column P turns to zeroes as expected - do you have calculation set to automatic or manual?

    btw, I think TEXT function in SUMIFS is redundant, it works OK as just

    =SUMIFS($D:$D,$A:$A,P$3,$C:$C,$F6)
    Audere est facere

  3. #3
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,827

    Re: Formula MalFunction

    I'm not sure I can explain what is going on, but I think the error is somehow in the TEXT() function. Excel appears to be trying to interpret the text in row 3 as a date, then back to text in the desired format, which changes all of the mmm18 to mmm17. Test using Formula evaluate tool (https://support.office.com/en-us/art...6-A70AA409B8A7 ) and see that, when Excel evaluates the text formula "Oct18" is changed to "Oct17" (same for the other months as well, but they still evaluate to 0). You can also see this by putting =TEXT(G3,"mmmyy") into G4 and copying across.

    I am not sure what solution to recommend. Since all of your monthyy values are simple text values and not date serial numbers, I might suggest that you get rid of the TEXT() function so that Excel will use the text in row 3 as is without trying to reinterpret the text as a date serial number (since it is not doing so in the way you expect) =SUMIFS($D:$D,$A:$A,P$3,$C:$C,$F6). The other thought might be to convert all of your mmmyy text strings (in both column A and row 3) into real date serial numbers and use them that way.

    ETA after seeing dll's post -- is this behavior different across different versions? I see the same behavior as suggested by the OP in 2007.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

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

    Re: Formula MalFunction

    Quote Originally Posted by MrShorty View Post
    ETA after seeing dll's post -- is this behavior different across different versions? I see the same behavior as suggested by the OP in 2007.
    I suspect it may be more to do with regional date settings - if you use mdy as default date setting then TEXT function might interpret OCT18 as 18th October in the current year, and then "mmmyy" changes that to OCT17, here in the UK beacuse we use dmy then OCT18 is always interpreted as 1st October 2018

  5. #5
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: Formula MalFunction

    I'm not sure but maybe this:
    Attached Files Attached Files

  6. #6
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Formula MalFunction

    Hello:

    Thanks to all but i am now using "Daddylongs" formula which works.
    R

+ 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] Malfunction of Formula
    By rizmomin in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-21-2017, 08:56 PM
  2. formula malfunction
    By rizmomin in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-10-2017, 02:56 AM
  3. [SOLVED] Sum formula malfunction
    By rizmomin in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-04-2017, 05:40 AM
  4. formula malfunction
    By tjbe63 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-26-2016, 11:59 AM
  5. formula malfunction
    By sdtsdt in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-16-2015, 01:31 PM
  6. [SOLVED] excel adding formula malfunction
    By Vit in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-20-2014, 05:24 PM
  7. Formula malfunction
    By jerry4all in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-06-2010, 10:06 AM

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