+ Reply to Thread
Results 1 to 4 of 4

count number of characters between two characters

  1. #1
    Registered User
    Join Date
    06-22-2017
    Location
    USA
    MS-Off Ver
    2016
    Posts
    8

    count number of characters between two characters

    Is there a way to count the numbers of characters between two characters? I don't need to extract,just count. I am trying to count the number of characters between "-", if there is more than one, they are separated by commas .i.e:


    1-1-name1 <---- this should result as 1
    1-2,3-name2 <---- this should result as 2
    1-2,3,4-name3 <---- this should result as 3

    Any ideas?

  2. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: count number of characters between two characters

    well....
    "," counts as character...so you want to exclude ,?
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Registered User
    Join Date
    06-22-2017
    Location
    USA
    MS-Off Ver
    2016
    Posts
    8

    Re: count number of characters between two characters

    thanks, got it working using the len and substitute command

  4. #4
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: count number of characters between two characters

    So this will work if you include comma
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    however if you want to exclude comma
    maybe this
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by humdingaling; 06-29-2017 at 10:08 PM. Reason: didnt need that extra IF

+ 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: 2
    Last Post: 02-09-2016, 11:00 AM
  2. [SOLVED] Count cells where characters 2 to 8 is a number
    By DD1 in forum Excel General
    Replies: 8
    Last Post: 08-16-2015, 09:17 PM
  3. [SOLVED] how to count number of characters in a cell
    By Mile029 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-05-2013, 11:09 PM
  4. How to count the number of characters while typing
    By Tam123 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-08-2013, 10:50 AM
  5. [SOLVED] To count number of items with certain characters
    By Excel Dumbo in forum Excel General
    Replies: 9
    Last Post: 10-16-2012, 02:28 AM
  6. Count the number of different characters in a range
    By aderougemont in forum Excel General
    Replies: 4
    Last Post: 01-12-2009, 11:36 AM
  7. Count Number of Characters in a cell?
    By AHJuncti in forum Excel General
    Replies: 2
    Last Post: 06-16-2005, 02:39 PM

Tags for this Thread

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