Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 19
Default Use FIND for / or \ or -

appy New Year all,
I want to use the FIND function with LEFT to extract the numbers left of a
marker which could be / or \ or -
I can only see how to use FIND for one character how to use for multiple
possibilites? (so when FIND reaches / or \ or - it returns the position)
Thanks for any suggestions
Bert
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,572
Default Use FIND for / or \ or -

Try this:

=LEFT(A1,MIN(FIND({"/","\","-"},A1&"/\-"))-1)

And copy down as needed.
--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===

"Bert" wrote in message
...
appy New Year all,
I want to use the FIND function with LEFT to extract the numbers left of a
marker which could be / or \ or -
I can only see how to use FIND for one character how to use for multiple
possibilites? (so when FIND reaches / or \ or - it returns the position)
Thanks for any suggestions
Bert


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Use FIND for / or \ or -

Instead of using:
=FIND()
use:
=IF(ISERROR(FIND("-",A1,1)),0,FIND("-",A1,1))+IF(ISERROR(FIND("\",A1,1)),0,FIND("\",A1, 1))+IF(ISERROR(FIND("/",A1,1)),0,FIND("/",A1,1))

--
Gary''s Student - gsnu200762


"Bert" wrote:

appy New Year all,
I want to use the FIND function with LEFT to extract the numbers left of a
marker which could be / or \ or -
I can only see how to use FIND for one character how to use for multiple
possibilites? (so when FIND reaches / or \ or - it returns the position)
Thanks for any suggestions
Bert

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default Use FIND for / or \ or -

Playing off of RD's really nifty solution, this one will return a blank if
there is no occurance of \, /, or- in the cells

=IF(LEFT(A1,MIN(FIND({"/","\","-"},A1&"/\-"))-1)=A1,"",LEFT(A1,MIN(FIND({"/","\","-"},A1&"/\-"))-1))

Vaya con Dios,
Chuck, CABGx3



"RagDyeR" wrote:

Try this:

=LEFT(A1,MIN(FIND({"/","\","-"},A1&"/\-"))-1)

And copy down as needed.
--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===

"Bert" wrote in message
...
appy New Year all,
I want to use the FIND function with LEFT to extract the numbers left of a
marker which could be / or \ or -
I can only see how to use FIND for one character how to use for multiple
possibilites? (so when FIND reaches / or \ or - it returns the position)
Thanks for any suggestions
Bert



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Use FIND for / or \ or -

Another way...

=LEFT(A1,FIND("^",SUBSTITUTE(SUBSTITUTE(SUBSTITUTE (A1,"\","^"),"/","^"),"-","^"))-1)


"Bert" wrote:

appy New Year all,
I want to use the FIND function with LEFT to extract the numbers left of a
marker which could be / or \ or -
I can only see how to use FIND for one character how to use for multiple
possibilites? (so when FIND reaches / or \ or - it returns the position)
Thanks for any suggestions
Bert



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 19
Default Use FIND for / or \ or -

Thanks for all your solutions as I see a use for them in other work

Bert

"Teethless mama" wrote:

Another way...

=LEFT(A1,FIND("^",SUBSTITUTE(SUBSTITUTE(SUBSTITUTE (A1,"\","^"),"/","^"),"-","^"))-1)


"Bert" wrote:

appy New Year all,
I want to use the FIND function with LEFT to extract the numbers left of a
marker which could be / or \ or -
I can only see how to use FIND for one character how to use for multiple
possibilites? (so when FIND reaches / or \ or - it returns the position)
Thanks for any suggestions
Bert

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,202
Default Use FIND for / or \ or -

Why not just pick one of the search characters and then do only two
substitutions (one for each of the other characters)...

=LEFT(A1,FIND("\",SUBSTITUTE(SUBSTITUTE(A1,"/","\"),"-","\"))-1)

Rick


"Teethless mama" wrote in message
...
Another way...

=LEFT(A1,FIND("^",SUBSTITUTE(SUBSTITUTE(SUBSTITUTE (A1,"\","^"),"/","^"),"-","^"))-1)


"Bert" wrote:

appy New Year all,
I want to use the FIND function with LEFT to extract the numbers left of
a
marker which could be / or \ or -
I can only see how to use FIND for one character how to use for multiple
possibilites? (so when FIND reaches / or \ or - it returns the position)
Thanks for any suggestions
Bert


  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,231
Default Use FIND for / or \ or -

CLR wrote...
Playing off of RD's really nifty solution, this one will return a
blank if there is no occurance of \, /, or- in the cells

=IF(LEFT(A1,MIN(FIND({"/","\","-"},A1&"/\-"))-1)=A1,
"",LEFT(A1,MIN(FIND({"/","\","-"},A1&"/\-"))-1))

....

No need for multiple FIND calls.

=SUBSTITUTE(LEFT(A1,MIN(FIND({"/","\","-"},A1&"/\-"))-1),A1,"")
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 First Non blank cell than find column header and return that value Silver Rose Excel Worksheet Functions 10 April 30th 07 05:56 PM
where to put results of find operation in find and replace functio DEP Excel Worksheet Functions 5 November 15th 06 07:52 PM
Despite data existing in Excel 2002 spreadsheet Find doesn't find AnnieB Excel Discussion (Misc queries) 1 June 16th 06 02:15 AM
'find' somtimes can't find numbers. I folowd the 'help' instructi. Yaron Excel Worksheet Functions 2 November 30th 05 05:46 PM
How do I find a file/spreadsheet that Excel says is Already open but I can't find it? nwtrader8 Excel Discussion (Misc queries) 5 June 21st 05 02:16 PM


All times are GMT +1. The time now is 12:34 PM.

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"