Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find position of a character within the worksheet cell
If you have a cell whose contents contain a sentence of text with several
spaces, how can you find the position of the last space? Thanks in advance, Christmas May |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find position of a character within the worksheet cell
InstrRev() function. Perhaps I should read the help files before posting!
"Christmas May" wrote: If you have a cell whose contents contain a sentence of text with several spaces, how can you find the position of the last space? Thanks in advance, Christmas May |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find position of a character within the worksheet cell
Try
=FIND(CHAR(1),SUBSTITUTE(A1," ",CHAR(1),LEN(A1)-LEN(SUBSTITUTE(A1," ","")))) As you posted in programming here's a VB solution Lastspace = Len(Left(Range("A1"), InStrRev(Range("A1"), " ") - 1)) + 1 Mike Mike "Christmas May" wrote: If you have a cell whose contents contain a sentence of text with several spaces, how can you find the position of the last space? Thanks in advance, Christmas May |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find position of a character within the worksheet cell
Far too complicated
Lastspace = InStrRev(Range("A1"), " ") Mike "Mike H" wrote: Try =FIND(CHAR(1),SUBSTITUTE(A1," ",CHAR(1),LEN(A1)-LEN(SUBSTITUTE(A1," ","")))) As you posted in programming here's a VB solution Lastspace = Len(Left(Range("A1"), InStrRev(Range("A1"), " ") - 1)) + 1 Mike Mike "Christmas May" wrote: If you have a cell whose contents contain a sentence of text with several spaces, how can you find the position of the last space? Thanks in advance, Christmas May |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find position of first non-matching character | Excel Worksheet Functions | |||
Insert a special character in 1st and last position into a cell | New Users to Excel | |||
Find Character Position in String | Excel Programming | |||
Function to return Character Position of Xth character within a string | Excel Programming | |||
How find character position # in string from right end? Or how get range row num | Excel Programming |