+ Reply to Thread
Results 1 to 10 of 10

Counting 0's

Hybrid View

  1. #1
    Registered User
    Join Date
    07-31-2014
    Location
    England
    MS-Off Ver
    2010
    Posts
    6

    Counting 0's

    Hi All,

    New to the forum, looking to count the 'total' number of 0's in a range.

    Have a number range from 1 - 107, within this range there are 18 instances of 0, I have tried the COUNTIF and a wildcard but cannot get the result of 18 instances of 0 that are present within this range.

    If you are all wondering what a strange request.....this was based on a problem I had where someone asked me how many 0 stickers will I need for the range from 1 - 107 (each number is a separate item), I quickly added up in my head and arrived at 17 forgetting 100 has 2 zeros!! So I messed up and just thought if the question ever surfaced again I could do a double check!

    Thanks - Ian

  2. #2
    Valued Forum Contributor TheCman81's Avatar
    Join Date
    11-06-2012
    Location
    Edinburgh, UK
    MS-Off Ver
    Excel 2003, 2007, 2010, 2013
    Posts
    346

    Re: Counting 0's

    It should just be

    =COUNTIF(A1:A107,0)
    Excel Guru in the making

    <----------If the question has been answered to your satisfication please click the Add Repuation star to the left

  3. #3
    Registered User
    Join Date
    07-31-2014
    Location
    England
    MS-Off Ver
    2010
    Posts
    6

    Re: Counting 0's

    This is what I thought but returns 0

  4. #4
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,078

    Re: Counting 0's

    Quote Originally Posted by E61 View Post
    This is what I thought but returns 0
    Then they're not zero.

    Find one that you think is 0 let's say A14
    In another cell, any cell enter =(A14=0)
    If it says TRUE its a zero, if it says FALSE its something else (could be spaces, non ASCII characters in the same cell).
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  5. #5
    Registered User
    Join Date
    07-31-2014
    Location
    England
    MS-Off Ver
    2010
    Posts
    6

    Re: Counting 0's

    Maybe I havent explained myself properly..... i.e 100 contains 2 0's

  6. #6
    Registered User
    Join Date
    07-31-2014
    Location
    England
    MS-Off Ver
    2010
    Posts
    6

    Re: Counting 0's

    It states false for A10 which is 10 therefore contains one 0

  7. #7
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,078

    Re: Counting 0's

    =COUNTIF(A1:A107,0)

    will count zeroes from A1:A107

    Not sure why you are using a wildcard.

  8. #8
    Registered User
    Join Date
    07-31-2014
    Location
    England
    MS-Off Ver
    2010
    Posts
    6

    Re: Counting 0's

    Literally just auto filled from 1 - 107

  9. #9
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,078

    Re: Counting 0's

    =SUM(LEN(A1:A107)-LEN(SUBSTITUTE(A1:A107,"0","")))

    Its an array formula, use Ctrl-Shift-Enter.

    Source: http://support.microsoft.com/kb/213889

  10. #10
    Registered User
    Join Date
    07-31-2014
    Location
    England
    MS-Off Ver
    2010
    Posts
    6

    Re: Counting 0's

    Legend!! You know your stuff

+ 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] Counting Matching values in two separate ranges without counting duplicates
    By Rhall6310 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-01-2014, 03:35 PM
  2. need help with counting criteria without counting duplicate rows
    By lya in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-11-2012, 10:14 PM
  3. Replies: 3
    Last Post: 03-01-2012, 06:17 AM
  4. Replies: 6
    Last Post: 02-04-2012, 06:57 PM
  5. [SOLVED] Counting Rows Then Counting Values in Columns
    By Michael via OfficeKB.com in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-01-2005, 12:05 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