+ Reply to Thread
Results 1 to 3 of 3

Problem with Excel SUMIFS function

  1. #1
    Registered User
    Join Date
    03-04-2013
    Location
    Charlottesville, VA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Question Problem with Excel SUMIFS function

    This formula works (Formula1): =SUMIFS(Query1!G:G,Query1!A:A,I2,Query1!B:B,J2). That is, it returns a number based on column G.

    This formula returns 0 (Formula2): =SUMIFS(Query1!G:G,Query1!A:A,F2,Query1!B:B,G2). That is, it appears to find no matching values in columns A and B, even though the values of F2 and G2 are identical to I2 and J2 of Formula 1.

    Here's the difference:

    Formula1 cells I2 and J2 have hard values (i.e., Barton, Martha respectively)

    Formula2 cells F2 and G2 contain formulas.

    The formula for F2: =LEFT(B2,E2-1).
    The formula for G2: =RIGHT(B2,LEN(B2)-E2).
    E2 contains a formula that counts characters (=FIND(",",B2,1)) in a cell that
    concantenates two source cells (=Query1!A3&", "&Query1!B3).
    Query1!A3 has a text value (i.e., last name) and Query1!B3 has a text value (i.e., first name.) Both of these
    cells have a format of General

    Here's the processing I am trying to accomplish:
    1. Create a formula that concantenates the LastName, FirstName. In this case, the formula =Query1!A3
    &", "&Query1!B3 succeeds.
    2. Convert the LastName, FirstName value back to discrete LastName and FirstName values. In this case,
    two step process is susccessful.
    3. Use the results of step 2 above in the SUMIFS function to total the number that appears in Column G
    in worksheet Query1!. In this case, the SUMIFS function does not work as it appears to be unable to match
    the values derived in step 2

    How do I translate the formula values in cells F2 and G2 into values that SUMIFS can understand and work as expected?

  2. #2
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,067

    Re: Problem with Excel SUMIFS function

    Here's my assumptions of why formula 2 doesn't give the result as in formula 1.

    1. 'Value' in I and J have beginning or trailing spaces.
    2. What's the value of E2-1? I assume that the result 'LEFT' formula is not the same as in column I and/or J

    Last but not least, it would be simpler if you could attach a spreadsheet, this way we can see what's wrong with it.

  3. #3
    Registered User
    Join Date
    03-04-2013
    Location
    Charlottesville, VA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Problem with Excel SUMIFS function

    Hi! Thank you for your patience. I found my error based upon your insight: The RIGHT formula =RIGHT(B2,LEN(B2)-E2) adds a space to the first name. When I trim the result, the SUMIFS works as expected!

+ 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