+ Reply to Thread
Results 1 to 6 of 6

SUMIFs to return a 0 or N/A if values not found

Hybrid View

  1. #1
    Registered User
    Join Date
    08-02-2013
    Location
    Chicago, Illinois, USA
    MS-Off Ver
    Excel 2007
    Posts
    2

    SUMIFs to return a 0 or N/A if values not found

    Hi - I am in Excel 2007. I have the following formula

    =SUMIFS('Period 2 AUM Data'!$AH:$AH,'Period 2 AUM Data'!$A:$A,B30)-SUMIFS('Period 1 AUM Data'!$AH:$AH,'Period 1 AUM Data'!$A:$A,B30)

    HOWEVER, if either "sumifs" statement finds NO data (e.g., the value in cell B30 does not exist in Column A on either tab, "Period 2 AUM Data" or "Period 1 AUM Data"), I'd like my formula to return a zero, or "N/A".

    Anyone know how to tweak my formula to return a 0 or NA if the value in cell B30 doesn't exist on one or the other tab?

    Thank you!

  2. #2
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: SUMIFs to return a 0 or N/A if values not found

    =IFERROR(SUMIFS('Period 2 AUM Data'!$AH:$AH,'Period 2 AUM Data'!$A:$A,B30),0)-IFERROR(SUMIFS('Period 1 AUM Data'!$AH:$AH,'Period 1 AUM Data'!$A:$A,B30),0)

    Unless you prefer:

    =IFERROR(SUMIFS('Period 2 AUM Data'!$AH:$AH,'Period 2 AUM Data'!$A:$A,B30)-SUMIFS('Period 1 AUM Data'!$AH:$AH,'Period 1 AUM Data'!$A:$A,B30)),0)


    Iferror is a VERY simple formula:
    http://chandoo.org/wp/2011/03/11/iferror-formula/
    Last edited by mikeTRON; 08-02-2013 at 03:39 PM.

  3. #3
    Registered User
    Join Date
    08-02-2013
    Location
    Chicago, Illinois, USA
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: SUMIFs to return a 0 or N/A if values not found

    Thank you!

  4. #4
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: SUMIFs to return a 0 or N/A if values not found

    Sure!

    His blog is amazing for people trying to expand their Excel know how:
    http://chandoo.org/wp/

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,723

    Re: SUMIFs to return a 0 or N/A if values not found

    SUMIFS won't return an error if the criteria isn't found.......it'll just return zero so I'm not sure that IFERROR will help....

    Try using COUNTIF to check if the criteria is present, i.e.

    =IF(COUNTIF('Period 2 AUM Data'!$A:$A,B30)*COUNTIF('Period 1 AUM Data'!$A:$A,B30),SUMIFS('Period 2 AUM Data'!$AH:$AH,'Period 2 AUM Data'!$A:$A,B30)-SUMIFS('Period 1 AUM Data'!$AH:$AH,'Period 1 AUM Data'!$A:$A,B30),"N/A")
    Audere est facere

  6. #6
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: SUMIFs to return a 0 or N/A if values not found

    try and see if this works:
    =IFERROR((1/(1/SUMIFS('Period 2 AUM Data'!$AH:$AH,'Period 2 AUM Data'!$A:$A,B30)))-(1/(1/SUMIFS('Period 1 AUM Data'!$AH:$AH,'Period 1 AUM Data'!$A:$A,B30))),NA())
    - i.s.z -
    CSE, aka Array aka { }, formulae are confirmed with CONTROL+SHIFT+ENTER.
    Replace commas ( , ) with semicolons ( ; ) in formulae, if your locale setting demands.
    All good ideas are courtesy resources from this forum as well as others around the web.
    - e.o.m -

+ 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. Replies: 3
    Last Post: 04-14-2013, 11:53 PM
  2. VB code to find recurring values and return x columns and x rows from found
    By TravisJB in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-07-2013, 12:28 PM
  3. [SOLVED] Check for three values and return other value if found
    By akalien in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-06-2012, 07:54 AM
  4. search a cell for values in a range, return values found
    By carpe.cervisiam in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-15-2011, 12:52 PM
  5. Replies: 5
    Last Post: 10-11-2008, 04:01 PM

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