+ Reply to Thread
Results 1 to 3 of 3

Count the numer of digits in an alphanumerc string

  1. #1
    Forum Contributor
    Join Date
    06-21-2010
    Location
    -
    MS-Off Ver
    Excel 2010
    Posts
    1,211

    Count the numer of digits in an alphanumerc string

    How can I count the number of numbers in an alphanumeric 'string'. My cell could be formatted as either a number or as text, depending on which would provide a solution?

    For example if a cell contains AC34723D6H78, there would be 8 numbers, in KT12.456 there would be 5 numbers an so on. I've tried playing around with LEN and various other things, but no no avail.

    I would like to be able to do two things, firstly, display the number of 'numbers' in an adjacent cell and secondly apply a conditional format to highlight cells that contain more than or less than a specified number of numbers within the 'string' if that is possible?

    Many thanks

  2. #2
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Count the numer of digits in an alphanumerc string

    Try this macro (button)

    The highlightcolor is the in B1 , so is the minimum number of digits to be highlighted
    Attached Files Attached Files

  3. #3
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Count the numer of digits in an alphanumerc string

    assuming your data starts in A1 going down, try this :
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Drag down

    Hope this helps

    Edit-

    for CF try it this way:
    (for >6 say)
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by dredwolf; 02-25-2013 at 04:45 PM.
    A picture may be worth a thousand words, BUT, a sample Workbook is worth a thousand screenshots!
    -Add a File - click advanced (next to quick post), scroll to manage attachments, click, select add files, click select files, select file, click upload, when file shows up at bottom left, click done (bottom right), click submit
    -To mark thread Solved- go top of thread,click Thread Tools,click Mark as Solved
    If you received helpful response, please remember to hit the * of that post

+ 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