+ Reply to Thread
Results 1 to 6 of 6

SUMIFS: If no criteria match, leave cell blank, else return value

Hybrid View

  1. #1
    Registered User
    Join Date
    03-26-2013
    Location
    Kansas City
    MS-Off Ver
    Excel 2010
    Posts
    1

    Re: SUMIFS: If no criteria match, leave cell blank, else return value

    Here is a potentially easier solution, where everything in [] gets replaced by your specific ranges and criteria cell names:

    =IF(COUNTIF([criteria range], [criteria])>0, SUMIFS([sum range], [criteria range], [criteria]), "")

    example: =IF(COUNTIF(H:H, A2)>0, SUMIFS(I:I, H:H, A2), "")

    This will give you back a blank whenever there isn't a data match to sum, and will help you avoid false zeros.

    The logic here is IF count finds at least one match, THEN add up the items with a match, ELSE return a blank.
    Last edited by KCchristoph; 03-26-2013 at 12:52 PM.

  2. #2
    Forum Contributor
    Join Date
    10-25-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    292

    Re: SUMIFS: If no criteria match, leave cell blank, else return value

    Quote Originally Posted by KCchristoph View Post

    =IF(COUNTIF([criteria range], [criteria])>0, SUMIFS([sum range], [criteria range], [criteria]), "")

    example: =IF(COUNTIF(H:H, A2)>0, SUMIFS(I:I, H:H, A2), "")

    This will give you back a blank whenever there isn't a data match to sum,...
    While I am getting the correct value when there is data that matches the criteria, I am still getting a zero when there isn't anything to sum. Where am I going wrong in the formula?

    =IF(COUNTIF($G3:$G27, ">0"), SUMIFS($G3:$G26, $A3:$A26, TODAY(), $H3:$H26, "Admin"), " ")
    Thank you for your help.

+ 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