+ Reply to Thread
Results 1 to 4 of 4

counting cells that display data

  1. #1
    Registered User
    Join Date
    03-31-2009
    Location
    Leicester, England
    MS-Off Ver
    Excel 2007
    Posts
    32

    counting cells that display data

    obviously if one wants to count all cells that contain data they can use COUNTA, but what if i have a range of cells that contain IF formulas and only want to count the cells that display data?

    presumably you'd have to use some variation of NOT(""), but i can't seem to make it work.
    Last edited by admiraldick; 06-15-2009 at 10:13 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: counting cells that display data

    Possibly:

    =COUNTIF(A1:A100,"?*")

    Assuming A1:A100 formulae return text.... if not (ie return numbers) use COUNT... if mix of numbers & text

    =COUNTA(A1:A100)-COUNTBLANK(A1:A100)

    (this is because COUNTBLANK treats Null as Blank whereas COUNTA does not)

    EDIT: re: mix you can also use SUMPRODUCT if preferred... =SUMPRODUCT(--(A1:A100<>""))
    Last edited by DonkeyOte; 06-12-2009 at 06:56 AM.

  3. #3
    Registered User
    Join Date
    03-31-2009
    Location
    Leicester, England
    MS-Off Ver
    Excel 2007
    Posts
    32

    Re: counting cells that display data

    the SUMPRODUCT formula works perfectly. thanks.

+ 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