+ Reply to Thread
Results 1 to 2 of 2

Countif function counts blanks

  1. #1
    Registered User
    Join Date
    03-24-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2007
    Posts
    8

    Countif function counts blanks

    The current countif function is matching and counting a code from the multiple sheets and returning the total value. However, if there is no code in 'sheet RE' A13 the formula will count all blank cells and return the total number of blank cells.

    Is there a way I can subtract the total amount of blank cells from my current formula to return 0?

    This is the following formula found on the RE sheet:

    =SUM(COUNTIF(INDIRECT("S"&{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27}&"!C1:C135"),"="&Table210[[#This Row],[ID]]))

    Comment Bank 1.xlsx

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

    Re: Countif function counts blanks

    Try it like this:

    =SUMPRODUCT(COUNTIF(INDIRECT("S"&ROW(INDIRECT("1:27"))&"!C1:C135"),Table210[[#This Row],[ID]]))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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