LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Harlan Grove
 
Posts: n/a
Default finding rightmost location of a character

daddylonglegs wrote...
Harlan Grove Wrote:

=LOOKUP(32768,FIND("/",A1,ROW(INDIRECT("1:"&LEN(A1)))))+1


Harlan, could you possibly explain the significance of the 32768?


The key is the LOOKUP call. Given how it works, if its 1st argument is
greater than any value in its 2nd argument, it returns the last item in
its last argument with the same type as its 1st argument. Since strings
can't be longer than 32767 characters in Excel, 32768 is guaranteed to
be greater than any numeric value returned by FIND, so the LOOKUP
formula above returns FIND's last numeric result, which corresponds to
the position of the last / in A1. You could use any arbitrarily large
value as the 1st argument to LOOKUP.

BTW I don't believe you need the +1 at the end


Sorry, the +1 advances you to the character position after the last /.
I was paying too much attention to other responses.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Count occurrence of character within a cell Kelli Excel Discussion (Misc queries) 2 January 18th 06 02:20 PM
Return cell contents based on conditional lookup jarviscars Excel Worksheet Functions 15 August 5th 05 08:05 AM
Finding a character type within a cell shineboxnj Excel Worksheet Functions 1 July 22nd 05 03:12 AM
Stock Location Sorting Problem mark1caroline Excel Discussion (Misc queries) 3 July 13th 05 03:53 PM
Add up Plus & Minus Figures separately by Location John Excel Worksheet Functions 2 January 21st 05 09:40 AM


All times are GMT +1. The time now is 08:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"