+ Reply to Thread
Results 1 to 9 of 9

COUNTIF Returning 0 when Value not found, anyway to return blank instead?

  1. #1
    Registered User
    Join Date
    12-17-2020
    Location
    London
    MS-Off Ver
    2010
    Posts
    64

    Question COUNTIF Returning 0 when Value not found, anyway to return blank instead?

    Hello there,

    I'm using the following =COUNTIF(A6:G6,"*Failed*") in the attached workbook, but I'm trying to figure out how to return a BLANK instead of 0 when value is not met.

    Any idea please?
    Another formula to use maybe?

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,781

    Re: COUNTIF Returning 0 when Value not found, anyway to return blank instead?

    H5=IF(COUNTIF(A5:G5,"*Failed*")=0,"",COUNTIF(A5:G5,"*Failed*"))

  3. #3
    Registered User
    Join Date
    12-17-2020
    Location
    London
    MS-Off Ver
    2010
    Posts
    64

    Re: COUNTIF Returning 0 when Value not found, anyway to return blank instead?

    Awesome! Thanks a lot

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,071

    Re: COUNTIF Returning 0 when Value not found, anyway to return blank instead?

    Another option, if your interested.
    =IFERROR(1/(1/COUNTIF(A5:G5,"*Failed*")),"")

  5. #5
    Registered User
    Join Date
    12-17-2020
    Location
    London
    MS-Off Ver
    2010
    Posts
    64

    Re: COUNTIF Returning 0 when Value not found, anyway to return blank instead?

    So cool, thanks a lot, this is more simplified but both works amazingly

  6. #6
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,071

    Re: COUNTIF Returning 0 when Value not found, anyway to return blank instead?

    Glad to help & thanks for the feedback.

  7. #7
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,496

    Re: COUNTIF Returning 0 when Value not found, anyway to return blank instead?

    Another option I use is that I use conditional formatting >> cells that contain >> equal to >> 0 then format the font the same as the cell fill color and they disappear, FWIW.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  8. #8
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: COUNTIF Returning 0 when Value not found, anyway to return blank instead?

    File/Option/Advance/ Show a zero in cells...
    release stick
    Quang PT

  9. #9
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: COUNTIF Returning 0 when Value not found, anyway to return blank instead?

    Conditional formatting could be used in custom format [=0]"";General

+ 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] LOOKUP to Return Certain Result if Blank Cells Found
    By morerockin in forum Excel General
    Replies: 5
    Last Post: 06-03-2020, 12:26 PM
  2. Get Excel to Return a Blank When a Value in My Formula Isnt Found
    By rachreed in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-30-2019, 11:40 AM
  3. [SOLVED] Max returning 0...I want to return blank
    By punter in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 08-24-2016, 07:02 PM
  4. Code to look at external link and if not found, return error or blank
    By magnus.blomquist in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-05-2016, 06:15 PM
  5. Make COUNTIF function return blank cell if no data is there
    By jordan1214 in forum Excel Formulas & Functions
    Replies: 21
    Last Post: 04-05-2015, 01:05 PM
  6. [SOLVED] Return blank if no exact match or blank is found
    By matrixpom in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-19-2013, 12:57 AM
  7. [SOLVED] Return data if blank cell is found
    By Dartmouth_jock in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-09-2013, 03:03 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