+ Reply to Thread
Results 1 to 4 of 4

How can we count the number of segments in a cell

  1. #1
    Registered User
    Join Date
    05-20-2013
    Location
    Bangalore
    MS-Off Ver
    Excel 2010
    Posts
    4

    How can we count the number of segments in a cell

    Hello,

    I have numeric data as below
    11.4.6
    11.4.6.1
    11.4.6.2
    11.4.6.3
    11.4.6.4
    11.4.6.5
    11.4.6.6
    11.4.7
    etc..
    I have around 10,000 lines of data like this

    I need to count the number segments.
    Ex: 11.4.6.1 has 4 segments(11,4,6,1) same way 11.4.7 has 3 segments.
    How can I Automate it.?

  2. #2
    Forum Guru martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: How can we count the number of segments in a cell

    =len(a1)-len(substitute(a1,".",""))+1
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Forum Contributor
    Join Date
    12-28-2012
    Location
    Mumbai - India
    MS-Off Ver
    Excel
    Posts
    145

    Re: How can we count the number of segments in a cell

    Its simple my friend
    use this formula

    =len(a1)-(len(a1)-len(substitute(a1,".","")))

  4. #4
    Registered User
    Join Date
    05-20-2013
    Location
    Bangalore
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: How can we count the number of segments in a cell

    @martindwilson:: Thank you, it worked

    @ gailkwad.mm :: this formula does only count the number of digits..

    Thank you both for your time..

+ 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