+ Reply to Thread
Results 1 to 5 of 5

How to count character and space?

  1. #1
    Rocky Lam
    Guest

    How to count character and space?

    How do I create a macro or script to calculate how characters and space in
    each cell? I import many worksheet to my other program but only import
    maxinum of total 30 characters and space per cell. I hate to have manually
    count each cell.

    Thanks

    Rocky




  2. #2
    JE McGimpsey
    Guest

    Re: How to count character and space?

    Do you really need a macro?

    You could use

    =LEN(A1)

    to get the length of the text in cell A1.


    In article <O9kSqZU9EHA.2600@TK2MSFTNGP09.phx.gbl>,
    "Rocky Lam" <RockylamATyahooDOTcom> wrote:

    > How do I create a macro or script to calculate how characters and space in
    > each cell? I import many worksheet to my other program but only import
    > maxinum of total 30 characters and space per cell. I hate to have manually
    > count each cell.
    >
    > Thanks
    >
    > Rocky


  3. #3
    Rocky Lam
    Guest

    Re: How to count character and space?

    Can you show me the step how to do this. I use the autosum function key and
    I don't get the result.

    Thanks

    Rocky


    "JE McGimpsey" <jemcgimpsey@mvps.org> wrote in message
    news:jemcgimpsey-63FC53.23025007012005@msnews.microsoft.com...
    > Do you really need a macro?
    >
    > You could use
    >
    > =LEN(A1)
    >
    > to get the length of the text in cell A1.
    >
    >
    > In article <O9kSqZU9EHA.2600@TK2MSFTNGP09.phx.gbl>,
    > "Rocky Lam" <RockylamATyahooDOTcom> wrote:
    >
    >> How do I create a macro or script to calculate how characters and space
    >> in
    >> each cell? I import many worksheet to my other program but only import
    >> maxinum of total 30 characters and space per cell. I hate to have
    >> manually
    >> count each cell.
    >>
    >> Thanks
    >>
    >> Rocky




  4. #4
    JE McGimpsey
    Guest

    Re: How to count character and space?

    instead of using Autosum, type

    =LEN(A1)

    directly in the formula bar of the cell you want to contain the formula.
    Change A1 to whichever cell you are trying to find the length of.


    Copy down the column for as many rows as necessary.

    In article <eKYp1mU9EHA.2608@TK2MSFTNGP10.phx.gbl>,
    "Rocky Lam" <RockylamATyahooDOTcom> wrote:

    > Can you show me the step how to do this. I use the autosum function key and
    > I don't get the result.
    >
    > Thanks
    >
    > Rocky
    >
    >
    > "JE McGimpsey" <jemcgimpsey@mvps.org> wrote in message
    > news:jemcgimpsey-63FC53.23025007012005@msnews.microsoft.com...
    > > Do you really need a macro?
    > >
    > > You could use
    > >
    > > =LEN(A1)
    > >


  5. #5
    Ken Wright
    Guest

    Re: How to count character and space?

    JEs given you your answer, but just in case it helps you can also manipulate
    these strings in Excel. If you are using it to find the cells with more
    than 30 characters and then editing the cells to reduce them then this can
    be done quite easily.

    Assuming you had a piece of text in cell A1 that was 40 characters long,
    then if in cell B1 you put the formula =LEFT(A1,30) you will get only the
    first 30 characters returned.

    Another option might be to select all the cells in a column, do data / text
    to columns / fixed width and then set a break at the 30th character. this
    will truncate your entire range of cells to a max of 30 characters.

    --
    Regards
    Ken....................... Microsoft MVP - Excel
    Sys Spec - Win XP Pro / XL 97/00/02/03

    ----------------------------------------------------------------------------
    It's easier to beg forgiveness than ask permission :-)
    ----------------------------------------------------------------------------

    "Rocky Lam" <RockylamATyahooDOTcom> wrote in message
    news:O9kSqZU9EHA.2600@TK2MSFTNGP09.phx.gbl...
    > How do I create a macro or script to calculate how characters and space in
    > each cell? I import many worksheet to my other program but only import
    > maxinum of total 30 characters and space per cell. I hate to have manually
    > count each cell.
    >
    > Thanks
    >
    > Rocky
    >
    >
    >




+ 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