View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
RagDyeR RagDyeR is offline
external usenet poster
 
Posts: 3,572
Default Finding a string of unknown length in a string of unknown length, Help!

Depending on how accurate your examples were, these might or might not work
for you.

These are longer then what you tried because I added the possibility that
the data might have varying lengths.

With data starting in A1 and going down,

Enter this in B1 for the daughterboard number:

=MID(A4,FIND("board",A4)+6,6)


Enter this in C1 for the name of the kinase enzyme:

=MID(SUBSTITUTE(A4,"for","^^",2),FIND("^^",SUBSTIT UTE(A4,"for","^^",2))+3,
FIND("(h)",A4)-FIND("^^",SUBSTITUTE(A4,"for","^^",2)))


Enter this in D1 for the ATP concentration:

=MID(A4,FIND(" at ",A4)+3,FIND("ATP",A4)-FIND(" at ",A4))


Then select B1 to D1, and copy down as needed.


--

HTH,

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

"Hankjam" ........ wrote in message
...
On Wed, 2 Jul 2008 14:33:40 -0700 (PDT), Pete_UK
wrote:

I'm a bit confused. Where is the name of your enzyme? What column is
your 89+ character string in? Do you want to split the 3 items out
into the next 3 columns for every row of data, or just for some that
match the enzyme? Does your data follow the example closely, with
variation in character length/position only in the ATP concentration
and what you call the kinase?

Pete

<snipped

Plate Plan for Daughterboard 286338 (05_jul08_0036) for XXX(h) at 12.0
ATP Concentration
Plate Plan for Daughterboard 286338 (05_jul08_0036) for XXXX(h) at
100.0 ATP Concentration
Plate Plan for Daughterboard 286338 (05_jul08_0036) for XXXX(h) at
45.0 ATP Concentration

<snipped more

My powers of written communication have never been a strong point.

"Plate Plan for Daughterboard 286338 (05_jul08_0036) for XXX(h) at
12.0 ATP Concentration"

is one example of a string copied into an excel cell A1.

From it I want to extract into three other cells the DB number, the
kinase name, which in this case is a three character string and the
isoform and the concentration of the ATP

286338 (=MID(A1,30,6), works pretty well)
XXX(h)
12.0 (=MID(A1,FIND(" at ",A1)+3,6), works but it is not very tidy)


The kinase name can vary in length, there are hundreds of them.
The ATP concentration can vary, we use 10 diffferent concentrations.

Cannot find anything to work for the variable and unkown nature of the
Kinase name, XXX(h) or XXXXXX(h)...

Cheers

Andrew j