Re: Finding a string within a string by Frank
Frank
Thu Sep 23 14:31:13 CDT 2004
Hi
if you like email me an example file. you may also try replacing the
semicolons with comas
email: frank[dot]kabel[at]freenet[dot]de
egards
Frank Kabel
Frankfurt, Germany
Sandra wrote:
> It doesn't like me. Could you please plug this and my data string
> into an excel file and see what it does for you? It just says "The
> formula you typed contains an error."
>
> "Frank Kabel" <frank.kabel@freenet.de> wrote in message
> news:OfHWyHaoEHA.556@tk2msftngp13.phx.gbl...
>> Hi
>> for cell A1 use:
>> =MID(A1;FIND("(";A1)+1;FIND(")";A1)-FIND("(";A1)-1)
>>
>> and for cell A3 you have to change ALL cell references:
>> =MID(A3;FIND("(";A3)+1;FIND(")";A3)-FIND("(";A3)-1)
>>
>>
>> --
>> Regards
>> Frank Kabel
>> Frankfurt, Germany
>>
>>
>> Sandra wrote:
>>> "=MID(A3;FIND("(";A1)+1;(FIND(")";A1)-FIND("(";A1))-1)"
>>>
>>> I can't figure it out. If you look at my original question below,
>>> you see that A3 and A1 are both cells that have the data I want to
>>> convert so I'm not sure what this is trying to do. Too much for my
>>> pea brain. If A1 has the source data and I change the reference of
>>> cell A3 to A1 it doesn't work.
>>>
>>>
>>> "Frank Kabel" <frank.kabel@freenet.de> wrote in message
>>> news:Oy5kb8ZoEHA.2764@TK2MSFTNGP11.phx.gbl...
>>>> Hi
>>>> what is the exact formula you have tried and what is the wrong
>>>> result?
>>>>
>>>> --
>>>> Regards
>>>> Frank Kabel
>>>> Frankfurt, Germany
>>>>
>>>>
>>>> Sandra wrote:
>>>>> Yes. It's the stuff inside the parentheses that I want to keep,
>>>>> not drop. Although that's a nice trick I'll keep for later use.
>>>>> Thanks
>>>>>
>>>>> The first response doesn't work for me and I don't know what I'm
>>>>> doing wrong.
>>>>>
>>>>> "Don Guillett" <donaldb@281.com> wrote in message
>>>>> news:eQy4doZoEHA.2068@TK2MSFTNGP09.phx.gbl...
>>>>>> I don't think I did what OP wanted anyway. I took out the text
he
>>>>>> wanted and left the rest.
>>>>>>
>>>>>> --
>>>>>> Don Guillett
>>>>>> SalesAid Software
>>>>>> donaldb@281.com
>>>>>> "Frank Kabel" <frank.kabel@freenet.de> wrote in message
>>>>>> news:uW8y$FZoEHA.3252@TK2MSFTNGP14.phx.gbl...
>>>>>>> Hi Don
>>>>>>> not sure but if you use TRIM within FIND I would use it as well
>>>>>>> for the first parameter:
>>>>>>>
>>>>
>>
=LEFT(TRIM(E1),FIND("(",TRIM(E1))-1)&TRIM(RIGHT(E1,LEN(E1)-FIND(")",E1)
>>>>>>> ))
>>>>>>>
>>>>>>> or did you mean:
>>>>>>>
>> =TRIM(LEFT(E1,FIND("(",E1)-1))&TRIM(RIGHT(E1,LEN(E1)-FIND(")",E1)))
>>>>>>>
>>>>>>> --
>>>>>>> Regards
>>>>>>> Frank Kabel
>>>>>>> Frankfurt, Germany
>>>>>>>
>>>>>>> "Don Guillett" <donaldb@281.com> schrieb im Newsbeitrag
>>>>>>> news:uukYsDYoEHA.1988@TK2MSFTNGP09.phx.gbl...
>>>>>>>> with a formula
>>>>>>>>
>>>>>>>>
>>>>
=LEFT(E1,FIND("(",TRIM(E1))-1)&TRIM(RIGHT(E1,LEN(E1)-FIND(")",E1)))
>>>>>>>> --
>>>>>>>> Don Guillett
>>>>>>>> SalesAid Software
>>>>>>>> donaldb@281.com
>>>>>>>> "Sandra" <ab@mdahospital.com> wrote in message
>>>>>>>> news:%23oNnuhXoEHA.3392@TK2MSFTNGP15.phx.gbl...
>>>>>>>>> Let's say
>>>>>>>>> A1 = aaaaaaa aaaaaaa (bbbb@ccccc.ddd)
>>>>>>>>> eeeeeeeeeeeeeeeeeeeeeeeeeeee A2 = aaa aaaaaaa
>>>>>>>>> (fffff@ccccc.ddd) eee
>>>>>>>>> A3 = aaaaaa aaaaaaaaaaa (ggggg.hhhhhhh@ccccc.ddd) ee e e.eee
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> I want to pull out everything within the parentheses. I'm
>>>>>>>>> trying to figure out how to do this with a combination of
Left
>>>>>>>>> and Search commands but I'm too stupid. HELP!