#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 49
Default Reverse Find

I want to use the Find function but I want to get the result going
from right to left. For example if I am searching for a space " ",

Steve Scott 75 - I want the find to return 3 NOT 6
Al Smith 4 - I want the find to return 2 Not 3

How can I modify this

FIND(" ",A1)

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 427
Default Reverse Find

This will work, if there are ALWAYS two blanks in the cell. It works
by nesting a Find within a Find, starting the outer Find using the
inner Find as a parameter. It subtracts that result from the overall
length of the string itself, adding 1 to account for the non-zero
start.

=LEN(A1)+1-FIND(" ",A1,FIND(" ",A1,1)+1)

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Reverse Find

Sub findlast()
For Each c In Range("e1:e2")
p = Len(c) - InStrRev(c, " ") + 1
MsgBox p
Next
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"snax500" wrote in message
ps.com...
I want to use the Find function but I want to get the result going
from right to left. For example if I am searching for a space " ",

Steve Scott 75 - I want the find to return 3 NOT 6
Al Smith 4 - I want the find to return 2 Not 3

How can I modify this

FIND(" ",A1)

Thanks


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 84
Default Reverse Find

Searching A1 for the character in C1:

=MAX((MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)=C1)
*ROW(INDIRECT("1:"&LEN(A1))))

(array-enter this formula with Ctrl + Shift+ Enter)

- David

On Aug 1, 10:24 am, snax500 wrote:
I want to use the Find function but I want to get the result going
from right to left. For example if I am searching for a space " ",

Steve Scott 75 - I want the find to return 3 NOT 6
Al Smith 4 - I want the find to return 2 Not 3

How can I modify this

FIND(" ",A1)

Thanks



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 84
Default Reverse Find

See also: http://j-walk.com/ss///excel/usertips/tip079.htm

- David

On Aug 1, 10:24 am, snax500 wrote:
I want to use the Find function but I want to get the result going
from right to left. For example if I am searching for a space " ",

Steve Scott 75 - I want the find to return 3 NOT 6
Al Smith 4 - I want the find to return 2 Not 3

How can I modify this

FIND(" ",A1)

Thanks



Reply
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
reverse value rb Excel Worksheet Functions 1 March 28th 07 02:51 AM
reverse value Mike Excel Worksheet Functions 0 March 28th 07 12:08 AM
reverse order Lamb Chop Excel Discussion (Misc queries) 2 June 20th 06 03:37 PM
How do I do a Reverse Find/Search in Excel? NumberDocc Excel Worksheet Functions 2 February 27th 06 10:55 PM
Reverse Sum vjeevar Excel Discussion (Misc queries) 2 February 8th 06 10:04 PM


All times are GMT +1. The time now is 11:23 AM.

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

About Us

"It's about Microsoft Excel"