+ Reply to Thread
Results 1 to 5 of 5

Count within a cell

  1. #1
    Registered User
    Join Date
    02-14-2006
    Posts
    4

    Count within a cell

    Is there any way of performing a count on an individual cell to identify the number of occurances of a specified character within that cell?

    e.g. Cell contains AAA_BBB_CCC_DDD

    I would like the number of underscores (3) to be returned and this value placed in a new cell?

    Thanks

  2. #2
    Toppers
    Guest

    RE: Count within a cell

    A1=AAA_BBB_CCC_DDD then in B1:

    =LEN(A1)-LEN(SUBSTITUTE(A1,"_",""))

    Replace "_" with required character

    HTH

    "presuming ed" wrote:

    >
    > Is there any way of performing a count on an individual cell to identify
    > the number of occurances of a specified character within that cell?
    >
    > e.g. Cell contains AAA_BBB_CCC_DDD
    >
    > I would like the number of underscores (3) to be returned and this
    > value placed in a new cell?
    >
    > Thanks
    >
    >
    > --
    > presuming ed
    > ------------------------------------------------------------------------
    > presuming ed's Profile: http://www.excelforum.com/member.php...o&userid=31526
    > View this thread: http://www.excelforum.com/showthread...hreadid=573700
    >
    >


  3. #3
    Bob Phillips
    Guest

    Re: Count within a cell

    =LEN(A1)-LEN(SUBSTITUTE(A1,"_","")

    --
    HTH

    Bob Phillips

    (replace somewhere in email address with gmail if mailing direct)

    "presuming ed" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Is there any way of performing a count on an individual cell to identify
    > the number of occurances of a specified character within that cell?
    >
    > e.g. Cell contains AAA_BBB_CCC_DDD
    >
    > I would like the number of underscores (3) to be returned and this
    > value placed in a new cell?
    >
    > Thanks
    >
    >
    > --
    > presuming ed
    > ------------------------------------------------------------------------
    > presuming ed's Profile:

    http://www.excelforum.com/member.php...o&userid=31526
    > View this thread: http://www.excelforum.com/showthread...hreadid=573700
    >




  4. #4
    Muhammed Rafeek M
    Guest

    RE: Count within a cell

    =LEN(A1)-LEN(SUBSTITUTE(A1,"_",))

    "presuming ed" wrote:

    >
    > Is there any way of performing a count on an individual cell to identify
    > the number of occurances of a specified character within that cell?
    >
    > e.g. Cell contains AAA_BBB_CCC_DDD
    >
    > I would like the number of underscores (3) to be returned and this
    > value placed in a new cell?
    >
    > Thanks
    >
    >
    > --
    > presuming ed
    > ------------------------------------------------------------------------
    > presuming ed's Profile: http://www.excelforum.com/member.php...o&userid=31526
    > View this thread: http://www.excelforum.com/showthread...hreadid=573700
    >
    >


  5. #5
    Registered User
    Join Date
    02-14-2006
    Posts
    4
    Thanks,

    works perfectly!

+ 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