+ Reply to Thread
Results 1 to 3 of 3

Counting cells with data in them while containing a formula

  1. #1
    Forum Contributor
    Join Date
    04-30-2013
    Location
    arizona
    MS-Off Ver
    365
    Posts
    147

    Counting cells with data in them while containing a formula

    Hello,

    I am trying to run a formula to determine how many cells in a range have data in them. The cells will all have a formula in them. The data could be numbers, letters, have hyphens or periods, etc.

    I tried using using Count but it does not work with hyphens and I tried using COUNTA but it considers cells with formulas in them as containing data even if it is blank.

    I have attached a spreadsheet as an example. The correct formula should show a count of 9 from the range of B2:B21.

    Thanks!
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,924

    Re: Counting cells with data in them while containing a formula

    Change the formula in B2 to:

    =IF(K2>0,K2,"")

    Try this:

    =COUNT(B2:B21)+COUNTIF(B2:B21,"?*")

    Or:

    =SUMPRODUCT(--(LEN(B2:B21)>0))

  3. #3
    Forum Contributor
    Join Date
    04-30-2013
    Location
    arizona
    MS-Off Ver
    365
    Posts
    147

    Re: Counting cells with data in them while containing a formula

    That worked great! Thank you.

+ 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. Replies: 3
    Last Post: 08-30-2018, 11:13 PM
  2. Formula for counting the amount of data cells with multiple criteria
    By jt93 in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 03-02-2017, 04:02 PM
  3. Ignore blank cells in formula counting number of different cells.
    By deneh in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-07-2015, 08:52 AM
  4. Counting data across multiple cells using a cell specific formula in countif
    By Brighteyed in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-24-2015, 10:04 PM
  5. Replies: 4
    Last Post: 04-25-2013, 03:53 AM
  6. Replies: 6
    Last Post: 02-04-2012, 06:57 PM
  7. counting cells with data without counting duplicates
    By labettis in forum Excel General
    Replies: 2
    Last Post: 11-05-2007, 12:10 PM

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