+ Reply to Thread
Results 1 to 15 of 15

SUMIFS condition not working

  1. #1
    Registered User
    Join Date
    03-19-2017
    Location
    Sydney
    MS-Off Ver
    2010 at home and 2013 at work
    Posts
    9

    SUMIFS condition not working

    Hi

    I am using a SUMIFs formual to calculate three different types of conditions and referencing them to another sheet.

    The formula is: =SUMIFS('All Segments'!D:D,'All Segments'!$N:$N,"Mainspreadsheet!"&B2,'All Segments'!$P:$P,"*"&Mainspreadsheet!C2&"*",'All Segments'!$C:$C,Mainspreadsheet!D2)

    Everything works until I add in ",'All Segments'!$N:$N,"Mainspreadsheet!"&B2,'" which is the 3rd condition. Can someone provide a fix for the formula as I am not sure how to fix this particular one. Apologies for the formula not being clean as well, I am an excel newbie.

    Thanks

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

    Re: SUMIFS condition not working

    =SUMIFS('All Segments'!D:D,'All Segments'!$N:$N,"Mainspreadsheet!"&B2,'All Segments'!$P:$P,"*"&Mainspreadsheet!C2&"*",'All Segments'!$C:$C,Mainspreadsheet!D2)

    maybe
    =SUMIFS('All Segments'!D:D,'All Segments'!$N:$N,Mainspreadsheet!B2,'All Segments'!$P:$P,"*"&Mainspreadsheet!C2&"*",'All Segments'!$C:$C,Mainspreadsheet!D2)
    will work
    Attached Files Attached Files
    Last edited by sandy666; 03-20-2017 at 01:13 AM.

  3. #3
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: SUMIFS condition not working

    Try
    The formula is: =SUMIFS('All Segments'!D:D,'All Segments'!$N:$N,Mainspreadsheet!B2,'All Segments'!$P:$P,"*"&Mainspreadsheet!C2&"*",'All Segments'!$C:$C,Mainspreadsheet!D2)

  4. #4
    Registered User
    Join Date
    03-19-2017
    Location
    Sydney
    MS-Off Ver
    2010 at home and 2013 at work
    Posts
    9

    Re: SUMIFS condition not working

    Thanks for the help Sandy and Jonmo1

    So i took the suggestion and got rid of the & so now its: =SUMIFS('All Segments'!D:D,'All Segments'!$N:$N,Mainspreadsheet!B2,'All Segments'!$P:$P,"*"&Mainspreadsheet!C2&"*",'All Segments'!$C:$C,Mainspreadsheet!D2)

    It still displays a result of 0 when it should be 433. I actually added the "&" in the first place after reading some earlier posts by someone who suggested putting &. Any other suggestions?

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

    Re: SUMIFS condition not working

    Attach a sample workbook. (Not a picture!)
    Make sure there is just enough data to demonstrate your need. Include a BEFORE (original) sheet and an AFTER (required output) sheet in the workbook if needed to show the process you're trying to complete or automate.
    Make sure your desired results are shown, mock them up manually if necessary. Remember, it should reflect original structure of your data.
    Remember to desensitize the data.
    Note:
    • Please do not attach password protected workbooks/worksheets
    • Please do not attach file(s) from exterior servers
    • Please do not attach file(s) with enabled any Workbook Open/Autorun macros!

    20 rows of data is enough (probably)

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    If link is not from FORUM server you have to wait until someone will want to watch the file from an external server.

  6. #6
    Registered User
    Join Date
    03-19-2017
    Location
    Sydney
    MS-Off Ver
    2010 at home and 2013 at work
    Posts
    9

    Re: SUMIFS condition not working

    Thanks for the reply. I will try to get a sample workbook when I get home, I have to run off for a few hours, thanks again!

  7. #7
    Registered User
    Join Date
    03-19-2017
    Location
    Sydney
    MS-Off Ver
    2010 at home and 2013 at work
    Posts
    9

    Re: SUMIFS condition not working

    Hi

    Ironically enough, as I was making the mock workbook (as attached), the equation actually works.

    I did however change the ranges around for easier reading (E.g. A - A, B- B, C - C compared to my previous workbook which was N-B, P-C and C-D). Is that the reason why it's not working? Something to do with the ranges?

    Thanks
    Attached Files Attached Files

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

    Re: SUMIFS condition not working

    Read this: SUMIFS() and pay attention to two things: Common Problems and Best practices

    If SUMIFS works in your example where is the problem?

    check attachment from post #2. There is your original formula (with dumb data)
    Last edited by sandy666; 03-20-2017 at 08:43 AM.

  9. #9
    Registered User
    Join Date
    03-19-2017
    Location
    Sydney
    MS-Off Ver
    2010 at home and 2013 at work
    Posts
    9

    Re: SUMIFS condition not working

    Thanks for the spreadsheet. I manage to fix the problem but I still don't get why.

    So basically I had the word 'business' in one of my columns in the sheet 'All Segments'. In my 'Mainspreadsheet' sheet, i had the condition text 'business' as well but it would still give me 0. I then tried copy and pasting the 'business' text from the 'All Segments' Column into my 'Mainspreadsheet' one and it worked. I don't get it though, they both are the exact same in terms of text? Can you explain why?

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

    Re: SUMIFS condition not working

    I assume your "business" is in P column and criteria for that column is in B2 cell
    I changed (in my example file) few words to "business" and criteria to business also and it works.

    typing and copying doesn't work? try in your B2 cell: e.g. ='All Segments'!P2 (where business exist) and check other cells with business also
    Last edited by sandy666; 03-20-2017 at 09:37 AM. Reason: typo

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

    Re: SUMIFS condition not working

    Seems the basic problem is solved so
    - it's always a good practice to show respect to the person(s) who have helped you
    - is a click on the Add Reputation first (left lower corner of the post of person(s) who helped you) and then
    - mark the thread as SOLVED (top right corner over your first post - Thread Tools). This is important for all of us,

    Thanks

  12. #12
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: SUMIFS condition not working

    One of the 'busines' texts did not exactly equal 'business'. It probably had a leading or trailing space.
    The same thing that caused you to do this in your original formula
    "*"&Mainspreadsheet!C2&"*"

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

    Re: SUMIFS condition not working

    But it ("*"&Mainspreadsheet!C2&"*" ) should recognize business with or without spaces

  14. #14
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: SUMIFS condition not working

    @sandy666
    Right, but that's not where the problem is.
    According to the original post, the problem is in the N column, where the original incorrectly did the concatenation
    'All Segments'!$N:$N,"Mainspreadsheet!"&B2

    But after correcting that concatenation to
    'All Segments'!$N:$N,Mainspreadsheet!B2

    It was still returning 0.


    So maybe, the original formula needs to do the wildcards on both column criteria.
    =SUMIFS('All Segments'!D:D,'All Segments'!$N:$N,"*"&Mainspreadsheet!B2&"*",'All Segments'!$P:$P,"*"&Mainspreadsheet!C2&"*",'All Segments'!$C:$C,Mainspreadsheet!D2)

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

    Re: SUMIFS condition not working

    You are right but without example with original data it's hard to say anything especially with words: maybe, probably, etc
    I've solution: No see - No idea

+ 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] Can't use sumifs() condition for multiple criteria
    By Venkatesh.S in forum Excel General
    Replies: 7
    Last Post: 06-15-2014, 02:39 AM
  2. How can use SUMIFS by condition in row and column?
    By Akatecho in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-22-2014, 11:41 PM
  3. [SOLVED] How to use date as a condition in sumifs function
    By 38570 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-04-2012, 10:31 AM
  4. [SOLVED] SUMIFS + condition on result
    By Davzx in forum Excel General
    Replies: 4
    Last Post: 06-28-2012, 12:59 PM
  5. [SOLVED] Using SUMIFS formula and OR condition simultaneously
    By monkiheed in forum Excel General
    Replies: 12
    Last Post: 05-16-2012, 02:24 PM
  6. [SOLVED] Date Condition in SUMIFS Statement
    By B-dub in forum Excel General
    Replies: 6
    Last Post: 05-14-2012, 05:18 PM
  7. [SOLVED] Using SUMIFS() with an OR() Like condition
    By DP978 in forum Excel General
    Replies: 4
    Last Post: 02-25-2010, 11:31 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