+ Reply to Thread
Results 1 to 6 of 6

Long Countif statement Not to Count Blank Cells

  1. #1
    Forum Contributor
    Join Date
    09-25-2012
    Location
    Ventura, united States
    MS-Off Ver
    Excel 2010
    Posts
    346

    Long Countif statement Not to Count Blank Cells

    I'm trying to string together a long Countif and I'm having trouble with the last criteria. I'm trying to make sure that the cell in column L:L is not blank. This is basically the same as the counta function except that it needs to be applied within the context of all the other criteria. I thought that "<>""" might work, but it does not seem to. Neither does NULL or EMPTY. Any help?



    Please Login or Register  to view this content.

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Long Countif statement Not to Count Blank Cells

    try

    =COUNTIFS(DATA!I:I,A4,DATA!G:G,"No",DATA!A:A,"*" & "2" & "*",DATA!C:C,"initial Review",DATA!L:L,"*")
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Long Countif statement Not to Count Blank Cells

    hi Jiptastic. this is the equivalent of your formula. you can use 2 double quotes lesser:
    =COUNTIFS(DATA!I:I,A4,DATA!G:G,"No",DATA!A:A,"*" & "2" & "*",DATA!C:C,"initial Review",DATA!L:L,"<>")

    since it's the same, it should give you the same problem. and we don't know what that problem is until we see a sample file. my guess is that column L:L may contain blanks created by formula as such:
    =""
    this will also be counted as non-blank for COUNTIF. so you might need to use:
    =COUNTIFS(DATA!I:I,A4,DATA!G:G,"No",DATA!A:A,"*" & "2" & "*",DATA!C:C,"initial Review",DATA!L:L,">""")

    again, we need your sample file to verify if it's not what you need. you can highlight those rows it's supposed to take in

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Long Countif statement Not to Count Blank Cells

    =COUNTIFS(DATA!I:I,A4,DATA!G:G,"No",DATA!A:A,"*" & "2" & "*",DATA!C:C,"initial Review",DATA!L:L,"<>")
    You should also be able to get rid of the ampersands and quotes around the 2:

    =COUNTIFS(DATA!I:I,A4,DATA!G:G,"No",DATA!A:A,"*2*",DATA!C:C,"initial Review",DATA!L:L,"<>")

    Note however, that wildcards don't work on numbers. So, if you're intention is to test for conditions like:

    121
    222
    321

    Then the wildcard criteria will not work.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Forum Contributor
    Join Date
    09-25-2012
    Location
    Ventura, united States
    MS-Off Ver
    Excel 2010
    Posts
    346

    Re: Long Countif statement Not to Count Blank Cells

    Great feedback from everyone. Simply using "*" seems to be working at the moment but I will keep some of these tools in my back pocket.

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Long Countif statement Not to Count Blank Cells

    You're welcome. We appreciate the feedback!

+ 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] Count cells starting from blank and reset after another blank
    By slasherdan in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 09-07-2013, 03:46 AM
  2. [SOLVED] If two cells are blank, if statement to show third statement is blank
    By juliewoo in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-20-2013, 12:28 PM
  3. COUNTIF Issues count blank cells among existing data
    By chrispulliam in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-21-2010, 01:52 AM
  4. Count blank cells within a range not including fully blank rows
    By twofootgiant in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 07-16-2008, 09:43 AM
  5. How do I use countif to count values excluding blank cells
    By Glenda in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-30-2006, 12:30 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