View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default 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