+ Reply to Thread
Results 1 to 4 of 4

Count specific numbers in a cell and not characters

  1. #1
    Forum Contributor
    Join Date
    09-06-2011
    Location
    manchester england
    MS-Off Ver
    Office 365
    Posts
    283

    Count specific numbers in a cell and not characters

    I am trying to get excel to count the number of numbers only in a cell and exclude other characters.

    I have tried count and currently trying LEN, it is close but it is counting everything.

    I have enclosed a sample is someone could help please?
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    05-12-2021
    Location
    Europe
    MS-Off Ver
    365
    Posts
    45

    Re: Count specific numbers in a cell and not characters

    Use this formula:
    =LET(a,FILTERXML("<t><s>"&SUBSTITUTE(F5,"-","</s><s>")&"</s></t>","//s"),IF(OR(ISNUMBER(a)=TRUE),COUNT(a)))

    The delimitator in the formula for different numbers is "-" ,if you have a different one change that in the formula

    I also attached your file with the formulas
    Attached Files Attached Files
    "Good Morning, Good Evening and Good Night"

  3. #3
    Forum Contributor
    Join Date
    09-06-2011
    Location
    manchester england
    MS-Off Ver
    Office 365
    Posts
    283

    Re: Count specific numbers in a cell and not characters

    Thank you that has worked perfectly

  4. #4
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Count specific numbers in a cell and not characters

    try

    =LEN(F5)-LEN(SUBSTITUTE(F5,"-",))+1

    or spill array

    =LEN(F5:F19)-LEN(SUBSTITUTE(F5:F19,"-",))+1

+ 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] Count specific number with in a cell that has large numbers of digits
    By JM6544088 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-10-2021, 08:52 PM
  2. Can you count numbers of characters that are the same from the left.
    By eriv85 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-17-2017, 09:51 AM
  3. How To Count Characters In A Cell But Exclude specific letters?
    By Vilac7 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-23-2017, 08:29 PM
  4. VBA to set accepted inputs to specific cell, allow numbers and characters in excel
    By Raf_sia in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-23-2015, 08:19 AM
  5. [SOLVED] How to extract specific numbers after and before certain characters.
    By addytiger in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-20-2012, 07:20 PM
  6. Count Numbers and Characters
    By Chuvawow.com in forum Excel General
    Replies: 3
    Last Post: 01-26-2011, 08:49 AM
  7. Count specific characters with numbers or letters
    By hoppscrouse in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-19-2007, 09:02 AM

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