+ Reply to Thread
Results 1 to 4 of 4

counting characters in a cell

  1. #1
    ram
    Guest

    counting characters in a cell

    I have the following formula in cell A1 =10+10+10
    i would like cell B1 to have a formula that counts the number of + signs in
    cell A1. In this example it would return 2

    I would like cell C1 to have a formula that counts the numbers in cell A1.
    In this case it would be 3

    Thanks in advance for your help



  2. #2
    RagDyeR
    Guest

    Re: counting characters in a cell

    Caveat -


    This should be used in XL02 or later.
    Earlier versions may crash when copying this type of formula containing cell
    to other WBs.


    Start my creating a 'named' formula that will return the actual formula from
    A1;


    Click in B1, then,
    <Insert> <Name> <Define>,
    In the "Names In Workbook" box, enter a short name, say
    frmla
    for formula.
    In the "Refers To" box, replace whatever's there with this formula:
    =GET.CELL(6,A1)
    Then <OK>


    What you have now is a 'relative' *named formula* that when entered in *any*
    cell, will return the contents of the cell (text, data, formulas) from the
    *previous* column.


    So, if you enter

    =frmla

    in B1, you'll see the formula displayed from A1 (=10+10+10)

    So, *now*, enter this in B1:

    =LEN(frmla)-LEN(SUBSTITUTE(frmla,"+",""))

    And this in C1:

    =B1+1
    --

    HTH,

    RD
    =====================================================
    Please keep all correspondence within the Group, so all may benefit!
    =====================================================


    "ram" <[email protected]> wrote in message
    news:[email protected]...

    I have the following formula in cell A1 =10+10+10
    i would like cell B1 to have a formula that counts the number of + signs in
    cell A1. In this example it would return 2

    I would like cell C1 to have a formula that counts the numbers in cell A1.
    In this case it would be 3

    Thanks in advance for your help




  3. #3
    ram
    Guest

    Re: counting characters in a cell

    Thanks for your help RD it works great


    "RagDyeR" wrote:

    > Caveat -
    >
    >
    > This should be used in XL02 or later.
    > Earlier versions may crash when copying this type of formula containing cell
    > to other WBs.
    >
    >
    > Start my creating a 'named' formula that will return the actual formula from
    > A1;
    >
    >
    > Click in B1, then,
    > <Insert> <Name> <Define>,
    > In the "Names In Workbook" box, enter a short name, say
    > frmla
    > for formula.
    > In the "Refers To" box, replace whatever's there with this formula:
    > =GET.CELL(6,A1)
    > Then <OK>
    >
    >
    > What you have now is a 'relative' *named formula* that when entered in *any*
    > cell, will return the contents of the cell (text, data, formulas) from the
    > *previous* column.
    >
    >
    > So, if you enter
    >
    > =frmla
    >
    > in B1, you'll see the formula displayed from A1 (=10+10+10)
    >
    > So, *now*, enter this in B1:
    >
    > =LEN(frmla)-LEN(SUBSTITUTE(frmla,"+",""))
    >
    > And this in C1:
    >
    > =B1+1
    > --
    >
    > HTH,
    >
    > RD
    > =====================================================
    > Please keep all correspondence within the Group, so all may benefit!
    > =====================================================
    >
    >
    > "ram" <[email protected]> wrote in message
    > news:[email protected]...
    >
    > I have the following formula in cell A1 =10+10+10
    > i would like cell B1 to have a formula that counts the number of + signs in
    > cell A1. In this example it would return 2
    >
    > I would like cell C1 to have a formula that counts the numbers in cell A1.
    > In this case it would be 3
    >
    > Thanks in advance for your help
    >
    >
    >
    >


  4. #4
    RagDyeR
    Guest

    Re: counting characters in a cell

    Appreciate the feed-back.
    --

    Regards,

    RD
    ----------------------------------------------------------------------------
    -------------------
    Please keep all correspondence within the Group, so all may benefit !
    ----------------------------------------------------------------------------
    -------------------

    "ram" <[email protected]> wrote in message
    news:[email protected]...
    Thanks for your help RD it works great


    "RagDyeR" wrote:

    > Caveat -
    >
    >
    > This should be used in XL02 or later.
    > Earlier versions may crash when copying this type of formula containing

    cell
    > to other WBs.
    >
    >
    > Start my creating a 'named' formula that will return the actual formula

    from
    > A1;
    >
    >
    > Click in B1, then,
    > <Insert> <Name> <Define>,
    > In the "Names In Workbook" box, enter a short name, say
    > frmla
    > for formula.
    > In the "Refers To" box, replace whatever's there with this formula:
    > =GET.CELL(6,A1)
    > Then <OK>
    >
    >
    > What you have now is a 'relative' *named formula* that when entered in

    *any*
    > cell, will return the contents of the cell (text, data, formulas) from the
    > *previous* column.
    >
    >
    > So, if you enter
    >
    > =frmla
    >
    > in B1, you'll see the formula displayed from A1 (=10+10+10)
    >
    > So, *now*, enter this in B1:
    >
    > =LEN(frmla)-LEN(SUBSTITUTE(frmla,"+",""))
    >
    > And this in C1:
    >
    > =B1+1
    > --
    >
    > HTH,
    >
    > RD
    > =====================================================
    > Please keep all correspondence within the Group, so all may benefit!
    > =====================================================
    >
    >
    > "ram" <[email protected]> wrote in message
    > news:[email protected]...
    >
    > I have the following formula in cell A1 =10+10+10
    > i would like cell B1 to have a formula that counts the number of + signs

    in
    > cell A1. In this example it would return 2
    >
    > I would like cell C1 to have a formula that counts the numbers in cell A1.
    > In this case it would be 3
    >
    > Thanks in advance for your help
    >
    >
    >
    >




+ 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