+ Reply to Thread
Results 1 to 4 of 4

count if cells contains a number

  1. #1
    Registered User
    Join Date
    07-09-2008
    Location
    Canada
    MS-Off Ver
    Office 365
    Posts
    91

    count if cells contains a number

    hello!

    found this thread and I want to do the same but using the countif function...

    http://www.excelforum.com/excel-prog...-a-number.html

    is there a way to adapt the non-vba if statement and place into the below code?

    Please Login or Register  to view this content.
    Thank you so much!

  2. #2
    Valued Forum Contributor
    Join Date
    03-16-2012
    Location
    Aarhus, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    992

    Re: count if cells contains a number

    So, you want a non-VBA solution? In that case:

    I don't if you can use =COUNTIF(), but the following should work:

    =SUMPRODUCT((ISNUM(X:X)*1)
    Sincerely
    S?ren Larsen

    "Give a man a fish, and you'll feed him for a day. Give a man a fishing rod, and he'll steal your yacht!"

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,699

    Re: count if cells contains a number

    I'm assuming you want a count of cells in a range which contain any digits, If so try this

    =SUMPRODUCT((MMULT(ISNUMBER(FIND({0,1,2,3,4,5,6,7,8,9},Your_range))+0,{1;1;1;1;1;1;1;1;1;1})>0)+0)
    Audere est facere

  4. #4
    Registered User
    Join Date
    07-09-2008
    Location
    Canada
    MS-Off Ver
    Office 365
    Posts
    91

    Re: count if cells contains a number

    Quote Originally Posted by daddylonglegs View Post
    I'm assuming you want a count of cells in a range which contain any digits, If so try this

    =SUMPRODUCT((MMULT(ISNUMBER(FIND({0,1,2,3,4,5,6,7,8,9},Your_range))+0,{1;1;1;1;1;1;1;1;1;1})>0)+0)
    works perfectly. +1 rep.

+ 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