Hello everybody,
I have data in an excel cell setup as follows:
unimportantData, dataToBeExtracted, unimportantData2, unimportantData3
I would like to extract the information "dataToBeExtracted", and had
considered using the MID function. However, the string length of
dataToBeExtracted is different for each row. Is there a way to get
Excel to read all data after the first comma, but before the second
(without a bunch of IF((MID,#,#)=",")'s that is (unless that's the best
way!))?
Thanks in advance for your help. Have a great day!
Brian
Don Guillett - 28 Nov 2006 15:07 GMT
You can use that or data>text to columns>or a macro using instr

Signature
Don Guillett
SalesAid Software
dguillett1@austin.rr.com
> Hello everybody,
>
[quoted text clipped - 10 lines]
> Thanks in advance for your help. Have a great day!
> Brian
Brian - 28 Nov 2006 15:34 GMT
That's fantastic! Thanks so much Don.
Cheers,
Brian
> You can use that or data>text to columns>or a macro using instr
>
[quoted text clipped - 16 lines]
> > Thanks in advance for your help. Have a great day!
> > Brian
JE McGimpsey - 28 Nov 2006 15:52 GMT
One way:
=MID(LEFT(A1,FIND("#",SUBSTITUTE(A1,",","#",2))-1), FIND(",",A1)+1,
255)
where 255 is just a large enough number to contain the data.
> Hello everybody,
>
[quoted text clipped - 10 lines]
> Thanks in advance for your help. Have a great day!
> Brian