View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.misc
Roger Govier Roger Govier is offline
external usenet poster
 
Posts: 2,886
Default How to detect characters with a cell?

Hi

If you are wanting to know that it is part of a path, then modifying
Ron's formula to
=IF(ISNUMBER(FIND("\ABC\",B2)),"ABC","")
will do that for you.

Or to return the first part of the path, regardless of what the path is,
then
=MID(B2,FIND("\",B2)+1,FIND("^^",(SUBSTITUTE(B2,"\ ","^^",2)))-1-FIND("\",B2))

--
Regards

Roger Govier


"Eric" wrote in message
...
Thank everyone for suggestions

Yes, I want to know if the string "ABC" is part of the *formula* and
not the
*result* of the formula?

InsertNameDefine
Name: Formula
Refers to: =GET.CELL(6,INDIRECT("RC[-1]",FALSE))
OK

It works when I insert a path in cell A1 and check it in cell B1, but
it
does not work if I use this approach in another cell.
My case is that I need to search the path formula in B2 and check it
on cell
J1.
Do I need to change any following parameter in order to make it work
for my
case?
Refers to: =GET.CELL(6,INDIRECT("RC[-1]",FALSE))
Do you have any suggestions?
Thank everyone very much for any suggestions
Eric


"T. Valko" wrote:

Do you want to know if the string "ABC" is part of the *formula* and
not the
*result* of the formula?

A1 contains this formula:

='C:\ABC\[Sample.xls]Sheet1'!A1

Create this named formula:

InsertNameDefine
Name: Formula
Refers to: =GET.CELL(6,INDIRECT("RC[-1]",FALSE))
OK

Then enter this formula in B1:

=IF(ISNUMBER(SEARCH("ABC",Formula)),"ABC","")

Biff

"Eric" wrote in message
...
Under cell A1, which contains a link to file
C:\ABC\[Sample.xls]Sheet1!A1.
In cell B1, I would like to detect whether cell A1 contains "ABC"
characters
inside this path, if yes, then return String "ABC", else nothing
"".

Does anyone have any suggestions?
Thank in advance for any suggestions
Eric