#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 43
Default Find function

If the "FIND" function tells me the first position from the LEFT that a
certain character exists in a string, what will do the same starting from the
RIGHT side of the string ?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Find function

Hi,

I suspect I've made this more difficult than it need be but try this while
we wait for a simpler solution.

=LEN(A1)-FIND("@",SUBSTITUTE(A1,B1,"@",LEN(A1)-LEN(SUBSTITUTE(A1,B1,""))))

Text in A1 Text to find (counting from the right) in B1

or if you want to know how far from the right the first character is
=LEN(A1)-FIND(B1,A1,1)+1

Mike

"Eric @ BP-EVV" wrote:

If the "FIND" function tells me the first position from the LEFT that a
certain character exists in a string, what will do the same starting from the
RIGHT side of the string ?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Find function

This will find the position of the last backslash in A1:

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

Since =substitute() is case sensitive, you can do this to find the last a (or A)
in A1.

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

Eric @ BP-EVV wrote:

If the "FIND" function tells me the first position from the LEFT that a
certain character exists in a string, what will do the same starting from the
RIGHT side of the string ?


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Find function

=LEN(A1)+1-FIND("H",A1)
--
David Biddulph

"Eric @ BP-EVV" wrote in message
...
If the "FIND" function tells me the first position from the LEFT that a
certain character exists in a string, what will do the same starting from
the
RIGHT side of the string ?



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Find function

But of course that isn't quite the same. It'll tell you how far from the
RIGHT the first occurrence counting from the LEFT is.
--
David Biddulph

"David Biddulph" <groups [at] biddulph.org.uk wrote in message
...
=LEN(A1)+1-FIND("H",A1)
--
David Biddulph

"Eric @ BP-EVV" wrote in message
...
If the "FIND" function tells me the first position from the LEFT that a
certain character exists in a string, what will do the same starting from
the
RIGHT side of the string ?







  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 43
Default Find function

Thanks gentlemen for the great responses. Once again I have discovered that
I didn't quite give enough information to get the reply I was really hoping
for, but al lthe replies were, none the less, very good and I'm sure will
help me at some point in the future. Let me give an example of some data in
Column A and what I'm looking to determine in column B:

Column A row 1
ZSFC4347SPR SF (that's 12 spaces between the "R" and the "S",
the total length of data in col A row 1 is 25)

Column B row 1
ZSFC4347SPR

In the example above where the "SF" is there could be as many as 4
characters and as few as 0....if there are any characters in the last "x"
positions I want to be able to extract all BUT those last "x" characters into
a different column, and it is also possible that the data could look like
this:

Column A row 2
Z8814/B ADX SF (that's 11 spaces between the "X" and the "S",
the total length of data in col A row 2 is 25)

Column B row 2
Z8814/B ADX

Is that enough of a challenge for y'all ??

Again....thanks for the assistance ! I really do love these forums, they
are a great wealth of knowledge !

"David Biddulph" wrote:

But of course that isn't quite the same. It'll tell you how far from the
RIGHT the first occurrence counting from the LEFT is.
--
David Biddulph

"David Biddulph" <groups [at] biddulph.org.uk wrote in message
...
=LEN(A1)+1-FIND("H",A1)
--
David Biddulph

"Eric @ BP-EVV" wrote in message
...
If the "FIND" function tells me the first position from the LEFT that a
certain character exists in a string, what will do the same starting from
the
RIGHT side of the string ?






  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Find function

On Thu, 29 May 2008 11:53:02 -0700, Eric @ BP-EVV
wrote:

Thanks gentlemen for the great responses. Once again I have discovered that
I didn't quite give enough information to get the reply I was really hoping
for, but al lthe replies were, none the less, very good and I'm sure will
help me at some point in the future. Let me give an example of some data in
Column A and what I'm looking to determine in column B:

Column A row 1
ZSFC4347SPR SF (that's 12 spaces between the "R" and the "S",
the total length of data in col A row 1 is 25)

Column B row 1
ZSFC4347SPR

In the example above where the "SF" is there could be as many as 4
characters and as few as 0....if there are any characters in the last "x"
positions I want to be able to extract all BUT those last "x" characters into
a different column, and it is also possible that the data could look like
this:

Column A row 2
Z8814/B ADX SF (that's 11 spaces between the "X" and the "S",
the total length of data in col A row 2 is 25)

Column B row 2
Z8814/B ADX

Is that enough of a challenge for y'all ??

Again....thanks for the assistance ! I really do love these forums, they
are a great wealth of knowledge !



Perhaps:

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

If you want to retain the trailing <space's, omit the TRIM function.
--ron
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
Find Function [email protected] Excel Worksheet Functions 2 September 14th 07 08:26 PM
Find function alamo Excel Worksheet Functions 1 September 16th 05 02:01 PM
Find function alamo Excel Worksheet Functions 1 September 16th 05 12:47 PM
Find Function Steve Excel Worksheet Functions 2 May 11th 05 07:56 PM
Help with the FIND function Ranger Excel Worksheet Functions 1 February 25th 05 03:24 PM


All times are GMT +1. The time now is 09:14 AM.

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"