Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to count the number of Characters in a cell. I had thought of using a
Do While loop and the Mid() Function to count, but I don't know what the last character is? Anybody got any ideas? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How about using the Len function?
NumberOfCharacters = Len(Range("A1").Value) -- Rick (MVP - Excel) "Martin" wrote in message ... I want to count the number of Characters in a cell. I had thought of using a Do While loop and the Mid() Function to count, but I don't know what the last character is? Anybody got any ideas? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Oh dear, of course that would be the way to go, completely forgot that
function!!! "Rick Rothstein" wrote: How about using the Len function? NumberOfCharacters = Len(Range("A1").Value) -- Rick (MVP - Excel) "Martin" wrote in message ... I want to count the number of Characters in a cell. I had thought of using a Do While loop and the Mid() Function to count, but I don't know what the last character is? Anybody got any ideas? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dear Martin
TRIM the value if imported from an external source and use the LEN function as below. LEN(Trim(Range("A" & intRow))) If this post helps click Yes -------------- Jacob Skaria "Martin" wrote: I want to count the number of Characters in a cell. I had thought of using a Do While loop and the Mid() Function to count, but I don't know what the last character is? Anybody got any ideas? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
number of characters in each cell | Excel Discussion (Misc queries) | |||
Keep specified number of characters at end of cell? | Excel Worksheet Functions | |||
Number of characters in a cell | Excel Discussion (Misc queries) | |||
set the number of characters in a cell | Excel Discussion (Misc queries) | |||
Max number of characters in a cell | Excel Discussion (Misc queries) |