Hello all!
Does anyone know how I may be able to search a string and extract text from
it using the MID and FIND function with multiple FINDS? I have a spreadsheet
for which I have a lengthy bit of text for which I have set up to currently
extract ",IE". I need to adapt the formula
=MID(Dump!A1,FIND(",IE.",Dump!A1)-2,5) to also search for either ",MA" or a
",MC". These characters will always be unique and there will not be a
combination of either in the text string. The string will have either one of
the three but not two or all of them. I thought there may be an OR function
I could use but am having no luck.
Thank you for your time any any help you may be able to provide.
|
|
0
|
|
|
|
Reply
|
Utf
|
1/13/2010 3:15:02 PM |
|
First of all, I prefer to use SEARCH rather than FIND because FIND is
case-sensitive, although that might be important to you. Here's one
way of doing it:
=3DIF(ISNUMBER(SEARCH(",IE.",Dump!A1)),MID(Dump!A1,SEARCH(",IE.",Dump!
A1)-2,5),"")& IF(ISNUMBER(SEARCH(",MA",Dump!A1)),MID(Dump!A1,SEARCH
(",MA",Dump!A1)-2,5),"")& IF(ISNUMBER(SEARCH(",MC",Dump!A1)),MID(Dump!
A1,SEARCH(",MC",Dump!A1)-2,5),"")
All one formula - hopefully you can see how it could be extended to
include other conditions.
Hope this helps.
Pete
On Jan 13, 3:15=A0pm, Brenda <Bre...@discussions.microsoft.com> wrote:
> Hello all!
>
> Does anyone know how I may be able to search a string and extract text fr=
om
> it using the MID and FIND function with multiple FINDS? =A0I have a sprea=
dsheet
> for which I have a lengthy bit of text for which I have set up to current=
ly
> extract ",IE". =A0I need to adapt the formula
> =3DMID(Dump!A1,FIND(",IE.",Dump!A1)-2,5) to also search for either ",MA" =
or a
> ",MC". =A0These characters will always be unique and there will not be a
> combination of either in the text string. =A0The string will have either =
one of
> the three but not two or all of them. =A0I thought there may be an OR fun=
ction
> I could use but am having no luck.
>
> Thank you for your time any any help you may be able to provide.
|
|
0
|
|
|
|
Reply
|
Pete_UK
|
1/13/2010 4:16:46 PM
|
|
Thanks Pete! I appreciate your help. This did the trick and I learned
something!
"Pete_UK" wrote:
> First of all, I prefer to use SEARCH rather than FIND because FIND is
> case-sensitive, although that might be important to you. Here's one
> way of doing it:
>
> =IF(ISNUMBER(SEARCH(",IE.",Dump!A1)),MID(Dump!A1,SEARCH(",IE.",Dump!
> A1)-2,5),"")& IF(ISNUMBER(SEARCH(",MA",Dump!A1)),MID(Dump!A1,SEARCH
> (",MA",Dump!A1)-2,5),"")& IF(ISNUMBER(SEARCH(",MC",Dump!A1)),MID(Dump!
> A1,SEARCH(",MC",Dump!A1)-2,5),"")
>
> All one formula - hopefully you can see how it could be extended to
> include other conditions.
>
> Hope this helps.
>
> Pete
>
> On Jan 13, 3:15 pm, Brenda <Bre...@discussions.microsoft.com> wrote:
> > Hello all!
> >
> > Does anyone know how I may be able to search a string and extract text from
> > it using the MID and FIND function with multiple FINDS? I have a spreadsheet
> > for which I have a lengthy bit of text for which I have set up to currently
> > extract ",IE". I need to adapt the formula
> > =MID(Dump!A1,FIND(",IE.",Dump!A1)-2,5) to also search for either ",MA" or a
> > ",MC". These characters will always be unique and there will not be a
> > combination of either in the text string. The string will have either one of
> > the three but not two or all of them. I thought there may be an OR function
> > I could use but am having no luck.
> >
> > Thank you for your time any any help you may be able to provide.
>
> .
>
|
|
0
|
|
|
|
Reply
|
Utf
|
1/13/2010 6:15:02 PM
|
|
Glad to hear it, Brenda - thanks for feeding back.
Pete
On Jan 13, 6:15=A0pm, Brenda <Bre...@discussions.microsoft.com> wrote:
> Thanks Pete! =A0I appreciate your help. =A0This did the trick and I learn=
ed
> something!
>
>
>
> "Pete_UK" wrote:
> > First of all, I prefer to use SEARCH rather than FIND because FIND is
> > case-sensitive, although that might be important to you. Here's one
> > way of doing it:
>
> > =3DIF(ISNUMBER(SEARCH(",IE.",Dump!A1)),MID(Dump!A1,SEARCH(",IE.",Dump!
> > A1)-2,5),"")& IF(ISNUMBER(SEARCH(",MA",Dump!A1)),MID(Dump!A1,SEARCH
> > (",MA",Dump!A1)-2,5),"")& IF(ISNUMBER(SEARCH(",MC",Dump!A1)),MID(Dump!
> > A1,SEARCH(",MC",Dump!A1)-2,5),"")
>
> > All one formula - hopefully you can see how it could be extended to
> > include other conditions.
>
> > Hope this helps.
>
> > Pete
>
> > On Jan 13, 3:15 pm, Brenda <Bre...@discussions.microsoft.com> wrote:
> > > Hello all!
>
> > > Does anyone know how I may be able to search a string and extract tex=
t from
> > > it using the MID and FIND function with multiple FINDS? =A0I have a s=
preadsheet
> > > for which I have a lengthy bit of text for which I have set up to cur=
rently
> > > extract ",IE". =A0I need to adapt the formula
> > > =3DMID(Dump!A1,FIND(",IE.",Dump!A1)-2,5) to also search for either ",=
MA" or a
> > > ",MC". =A0These characters will always be unique and there will not b=
e a
> > > combination of either in the text string. =A0The string will have eit=
her one of
> > > the three but not two or all of them. =A0I thought there may be an OR=
function
> > > I could use but am having no luck.
>
> > > Thank you for your time any any help you may be able to provide.
>
> > .- Hide quoted text -
>
> - Show quoted text -
|
|
0
|
|
|
|
Reply
|
Pete_UK
|
1/14/2010 1:58:16 AM
|
|
|
3 Replies
1056 Views
(page loaded in 0.098 seconds)
Similiar Articles: Nested MID and FIND - OR? - microsoft.public.excel.worksheet ...Hello all! Does anyone know how I may be able to search a string and extract text from it using the MID and FIND function with multiple FINDS? I... Nested IF & AND functions - microsoft.public.excel.worksheet ...Nested MID and FIND - OR? - microsoft.public.excel.worksheet ... Hello all! Does anyone know how I may be able to search a string and extract text from it using the MID ... Nesting IF Statement in excel 2007 - microsoft.public.excel ...Nesting IF Statement in excel 2007 - microsoft.public.excel ... Nesting IF Statement in excel 2007 - microsoft.public.excel ... Nested MID and FIND - OR? - microsoft ... Multiple IF conditions-AND/OR - microsoft.public.excel.programming ...Nested MID and FIND - OR? - microsoft.public.excel.worksheet ... Multiple IF conditions-AND/OR - microsoft.public.excel.programming ... Try nested if statements: If (Cond1 ... Nested groups - microsoft.public.windows.server.active_directory ...Nested MID and FIND - OR? - microsoft.public.excel.worksheet ... Hello all! Does anyone know how I may be able to search a string and extract text from it using the MID ... Nested If Formula - microsoft.public.excel.miscNested MID and FIND - OR? - microsoft.public.excel.worksheet ... Nested If Formula - microsoft.public.excel.misc How to give find function ( same as of ctrl F) in formula ... Nested Table question - microsoft.public.word.vba.general ...Nested MID and FIND - OR? - microsoft.public.excel.worksheet ..... Post Question Groups ... Visit eBay for great deals on a huge selection nesting tables mid century. Extracting text from right to left using MID and FIND - microsoft ...Nested MID and FIND - OR? - microsoft.public.excel.worksheet ..... know how I may be able to search a string and extract text from it using the MID and FIND ... Extract Month From A Text String - microsoft.public.excel.misc ...Does anyone know how I may be able to search a string and extract text from it ... Extract Month From A Text String - microsoft.public.excel.misc ... Nested MID and FIND ... How to give find function ( same as of ctrl F) in formula bar ...Nested MID and FIND - OR? - microsoft.public.excel.worksheet ... Nested If Formula - microsoft.public.excel.misc How to give find function ( same as of ctrl F) in formula ... Nested MID and FIND - OR? - microsoft.public.excel.worksheet ...Hello all! Does anyone know how I may be able to search a string and extract text from it using the MID and FIND function with multiple FINDS? I... Use of Find with Left, Mid, Right functions in nested IF(and('s ...Excel Discussion (Misc queries) ... I have a rather large (11k+ rows) sheet with, well, too many columns, to which I've ... do you want to search for number 3 always ... Make Nested Functions Work in Excel - O'Reilly Media - Technology ...You can nest functions only to seven levels in Excel. If you have a particularly ... =IF(ISNUMBER(C2),IF(IF(MID(B2,FIND(" ",B2,1)+1, LEN(B2)-FIND(" ",B2,1))="Blend",C2*0 ... Using Excel's Find and Mid to extract a substring when you don't ...Here's how to use Excel's Find function in conjunction with the Mid function to locate and extract a string, regardless of how many characters the sou Left, Mid, and Find Function in Excel 2007 - YouTubeThis video demonstrates uses of the left, mid, and find function in Excel 2007 to ... 3:58 Watch Later Error Nesting IF and AND functions in Excel 2007 by ... 7/20/2012 2:29:01 PM
|