Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
how can I get the last char of a string?
e.g. "abcdefg" - last char is "g" does excel know something like "txt[ Len(txt) ]"??? -- icq 25372592 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
myString = "abcdefg"
lastChar = Right(myString,1) "Buddy Lee" wrote in message ... how can I get the last char of a string? e.g. "abcdefg" - last char is "g" does excel know something like "txt[ Len(txt) ]"??? -- icq 25372592 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
thank you ;)
-- icq 25372592 "Mark H. Shin" píše v diskusním příspěvku ... myString = "abcdefg" lastChar = Right(myString,1) "Buddy Lee" wrote in message ... how can I get the last char of a string? e.g. "abcdefg" - last char is "g" does excel know something like "txt[ Len(txt) ]"??? -- icq 25372592 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
txt = "abcdefg"
chr = Right(txt,1) msgbox chr -- Regards, Tom Ogilvy "Buddy Lee" wrote in message ... how can I get the last char of a string? e.g. "abcdefg" - last char is "g" does excel know something like "txt[ Len(txt) ]"??? -- icq 25372592 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Use "Right" as in: sText = Right(YourString, 1) MsgBox sText HTH/ "Buddy Lee" wrote: how can I get the last char of a string? e.g. "abcdefg" - last char is "g" does excel know something like "txt[ Len(txt) ]"??? -- icq 25372592 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Right(txt,1) will give "g" if txt="abcdefg" "Buddy Lee" wrote: how can I get the last char of a string? e.g. "abcdefg" - last char is "g" does excel know something like "txt[ Len(txt) ]"??? -- icq 25372592 |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Right(Text,1) will do it.
-- - K Dales "Buddy Lee" wrote: how can I get the last char of a string? e.g. "abcdefg" - last char is "g" does excel know something like "txt[ Len(txt) ]"??? -- icq 25372592 |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Buddy,
IIRC, the Right() function was introduced to VBA in the Office 2000 version. So if you need to support earlier versions, you could use a combination of the Mid() & Len() functions. Regards, Vic Eldridge "Buddy Lee" wrote: how can I get the last char of a string? e.g. "abcdefg" - last char is "g" does excel know something like "txt[ Len(txt) ]"??? -- icq 25372592 |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Right has been there a long time before xl2k.
I bet you were thinking of instrrev. Vic Eldridge wrote: Hi Buddy, IIRC, the Right() function was introduced to VBA in the Office 2000 version. So if you need to support earlier versions, you could use a combination of the Mid() & Len() functions. Regards, Vic Eldridge "Buddy Lee" wrote: how can I get the last char of a string? e.g. "abcdefg" - last char is "g" does excel know something like "txt[ Len(txt) ]"??? -- icq 25372592 -- Dave Peterson |
#10
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I bet you were thinking of instrrev.
I think you've won that bet Dave. Thanks for the correction. Regards, Vic Eldridge "Dave Peterson" wrote: Right has been there a long time before xl2k. I bet you were thinking of instrrev. Vic Eldridge wrote: Hi Buddy, IIRC, the Right() function was introduced to VBA in the Office 2000 version. So if you need to support earlier versions, you could use a combination of the Mid() & Len() functions. Regards, Vic Eldridge "Buddy Lee" wrote: how can I get the last char of a string? e.g. "abcdefg" - last char is "g" does excel know something like "txt[ Len(txt) ]"??? -- icq 25372592 -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can I find a value from one cell in a char string in another? | Excel Worksheet Functions | |||
How to retrieve certain char within a string? | Excel Discussion (Misc queries) | |||
How do i get the last position of a char (space) in a string? | Excel Worksheet Functions | |||
string/char CONTAINS function? | Excel Worksheet Functions | |||
Validation through VBA using string has 255 char limit?????? | Excel Programming |