ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do i get the last position of a char (space) in a string? (https://www.excelbanter.com/excel-worksheet-functions/114045-how-do-i-get-last-position-char-space-string.html)

EsPoNjOsO

How do i get the last position of a char (space) in a string?
 
I need to knok how do i get the last ocurrency of a char in s astring.
Example:
"i like dogs and cats" and i need to return the last position of the space,
i want to return 16 in this string, but i want to do it with some function

Ron Rosenfeld

How do i get the last position of a char (space) in a string?
 
On Thu, 12 Oct 2006 03:14:01 -0700, EsPoNjOsO
wrote:

I need to knok how do i get the last ocurrency of a char in s astring.
Example:
"i like dogs and cats" and i need to return the last position of the space,
i want to return 16 in this string, but i want to do it with some function



=FIND(CHAR(1),SUBSTITUTE(A1," ",CHAR(1),
LEN(A1)-LEN(SUBSTITUTE(A1," ",""))))


--ron


All times are GMT +1. The time now is 10:07 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com