+ Reply to Thread
Results 1 to 4 of 4

VBA - Counting Characters in Cell

  1. #1
    Forum Contributor
    Join Date
    12-22-2004
    Location
    Kokomo, Indiana
    Posts
    236

    Question VBA - Counting Characters in Cell

    Group,
    How can I count the number of characters that appear in a cell? The characters are in text. The only characters appearing are 0-9, A, B, C, D, E, F and $. I need to know how many characters appear in a cell give a Row, Column. Actually it doesn't matter what characters reside in the cell, the number of characters is the important thing I'm looking for.

    Tony

  2. #2
    Vasant Nanavati
    Guest

    Re: VBA - Counting Characters in Cell

    For example:

    Len(Range("A1"))

    --

    Vasant



    "ajocius" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Group,
    > How can I count the number of characters that appear in a cell?
    > The characters are in text. The only characters appearing are 0-9, A,
    > B, C, D, E, F and $. I need to know how many characters appear in a
    > cell give a Row, Column. Actually it doesn't matter what characters
    > reside in the cell, the number of characters is the important thing I'm
    > looking for.
    >
    > Tony
    >
    >
    > --
    > ajocius
    > ------------------------------------------------------------------------
    > ajocius's Profile:
    > http://www.excelforum.com/member.php...o&userid=17695
    > View this thread: http://www.excelforum.com/showthread...hreadid=395220
    >




  3. #3
    Rowan
    Guest

    RE: VBA - Counting Characters in Cell

    len(cells(1,1).text)
    or len(cells(1,1).value)

    Hope this helps
    Rowan

    "ajocius" wrote:

    >
    > Group,
    > How can I count the number of characters that appear in a cell?
    > The characters are in text. The only characters appearing are 0-9, A,
    > B, C, D, E, F and $. I need to know how many characters appear in a
    > cell give a Row, Column. Actually it doesn't matter what characters
    > reside in the cell, the number of characters is the important thing I'm
    > looking for.
    >
    > Tony
    >
    >
    > --
    > ajocius
    > ------------------------------------------------------------------------
    > ajocius's Profile: http://www.excelforum.com/member.php...o&userid=17695
    > View this thread: http://www.excelforum.com/showthread...hreadid=395220
    >
    >


  4. #4
    Forum Contributor
    Join Date
    12-22-2004
    Location
    Kokomo, Indiana
    Posts
    236
    Thanx for the replies, they work perfectly.

    Tony

+ 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