+ Reply to Thread
Results 1 to 4 of 4

COUNTIF Trouble

  1. #1
    Registered User
    Join Date
    09-26-2012
    Location
    Pittsburgh, PA
    MS-Off Ver
    MS Office 2010
    Posts
    64

    COUNTIF Trouble

    Hello all,

    I'm trying to use a COUNTIF function to tell me how many cells in a certain column have anything in them, so basically any cell that isn't a blank, I want in the count. I was using COUNTIF(A2:A1592,"*"), and it is returning 1590, which is not the correct count. I did a trim of the column, and made sure the sheet was in General formatting, but the formula still returns the 1590. Any idea what could be causing this and what the appropriate fix is?

    Thanks,

    Mike
    Last edited by Shadefalcon; 04-22-2013 at 02:24 PM.

  2. #2
    Valued Forum Contributor Lemice's Avatar
    Join Date
    04-13-2013
    Location
    Somewhere.
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: COUNTIF Trouble

    Hello,

    You can simply do a COUNTBLANK(A2:A1592) and it will return the number of rows with blank. If you know your total number of rows, a simple subtraction will give you the number of rows that is not blank.
    (copy pasta from Ford)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools

    Regards,
    Lem

  3. #3
    Registered User
    Join Date
    09-26-2012
    Location
    Pittsburgh, PA
    MS-Off Ver
    MS Office 2010
    Posts
    64

    Re: COUNTIF Trouble

    Yeah, that was a good work-around. Thanks for your help.

  4. #4
    Valued Forum Contributor Lemice's Avatar
    Join Date
    04-13-2013
    Location
    Somewhere.
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: COUNTIF Trouble

    Actually you can use this too - COUNTA(A2:A1592), it will tells you right away rows that are "Active" - with a value that isn't blank.

+ 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