+ Reply to Thread
Results 1 to 7 of 7

SUMIFS Formula: Can it ignore a Blank Criteria field?

  1. #1
    Registered User
    Join Date
    10-04-2012
    Location
    Denver, Colorado
    MS-Off Ver
    Excel 2010
    Posts
    18

    SUMIFS Formula: Can it ignore a Blank Criteria field?

    Hello Everyone,

    I'm looking for a bit of creative thought on a SUMIFS forumla. Here's the problem:

    I am creating a worksheet where I would like a user to be able to select one or more criteria and to then have the SUMIFS function caclulate the appropriate information, even if one of the applicable critera is left blank. As a simple example, in cell D1 I would have the formula below, with A1 as an input field for Expense Type, B1 as an input field for Location, and C1 as an input field for Organization.

    So I would have the formula like this: =SUMIFS(Sum Range,Criteria Range 1,A1,Criteria Range 2,B1, Criteria Range 3,C1)

    The goal would be to be able to put an input into each of the three inputs and get a result (For example: California is A1, Airfare is B1, and Human Resources is C1), or to be able to put an input in just two (or even one of the fields) and have the Sumifs formula ignore the empty field (For example California is A1, Airfare is B1). In a perfect world, my data would be pivot-table friendly and I could use slicers, but unfortunately it isnt (Dates as columns). Does anyone have a creative idea for this problem?

    Thanks in advance,
    Mike

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: SUMIFS Formula: Can it ignore a Blank Criteria field?

    Hi,

    I can think of two options and there may be others.

    1. Either use the wild card character in A1, B1 or C1 rather than leaving blank when you want to include all the items.
    OR
    2. Build the wild card character into the formula e.g
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: SUMIFS Formula: Can it ignore a Blank Criteria field?

    Make the default subcriteria "*", which will still work against all values.

    Richard's option 2 is genius.

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: SUMIFS Formula: Can it ignore a Blank Criteria field?

    Please Login or Register  to view this content.
    Change the data (rearange the data) with an macro.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  5. #5
    Registered User
    Join Date
    10-04-2012
    Location
    Denver, Colorado
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: SUMIFS Formula: Can it ignore a Blank Criteria field?

    Hello Everyone,

    Thanks for all of the help and so quickly!- I tried using a wildcard character as my criteria, but the problem is that Excel wont sum rows that have a blank value. My data does have blank values in one of the criteria ranges, but not necessarily the other two. It looks like the wildcard will exclude the blank rows and not sum up everything I need it to. This is why I was hoping there was a creative way to get the formula to ignore the criteria field if there was no input value (in A1, B1 or C1). Is there a way around this?

    Thanks,
    Mike

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

    Re: SUMIFS Formula: Can it ignore a Blank Criteria field?

    If you only have possible blanks in one of the ranges, Criteria Range 1 for example, then you could adapt Richard's suggestion with an IF like this:

    =IF(A1="",SUMIFS(Sum Range,Criteria Range 2,IF(B1="","*",B1), Criteria Range 3,IF(C1="","*",C1)),SUMIFS(Sum Range,Criteria Range 1,A1,Criteria Range 2,IF(B1="","*",B1), Criteria Range 3,IF(C1="","*",C1))

    Note that "*" will only work for text values not numbers
    Audere est facere

  7. #7
    Registered User
    Join Date
    10-04-2012
    Location
    Denver, Colorado
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: SUMIFS Formula: Can it ignore a Blank Criteria field?

    Thanks for your help everyone!

    I was able to find a seperate workaround that accomodated my worksheet.

    Mike

+ 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] Autofilter with multiple criteria - how to ignore blank criteria
    By MOONDRIFT47 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-31-2012, 12:20 PM
  2. Replies: 4
    Last Post: 10-07-2011, 10:36 AM
  3. SUMIFS Not Blank Criteria
    By philwilliams80 in forum Excel General
    Replies: 3
    Last Post: 09-30-2011, 11:27 AM
  4. Replies: 5
    Last Post: 09-07-2011, 11:14 PM
  5. Replies: 5
    Last Post: 05-31-2010, 07:38 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