Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
M John
 
Posts: n/a
Default filename search and extract into a cell

Here's what I'm looking for....
Say the file name is: "Eval - Technical - Offeror01.xls" and there will be
several different spreadsheets "...Offeror02", "...Offeror03", etc.

I would like to extract from the file name the Offeror01 part. I've used
this equation befo
=MID(CELL("filename",A1),FIND("[",CELL("filename",A1),1)+1,FIND("]",CELL("filename",A1),1)-FIND("[",CELL("filename",A1),1)-1)

But now (as I said) want to select out that last part.

Any ideas?

Thanks,
MJohn
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default filename search and extract into a cell

Always 9 characters offeror##???

if yes:

=MID(CELL("filename",A1),SEARCH("offeror",CELL("fi lename",A1)),9)



M John wrote:

Here's what I'm looking for....
Say the file name is: "Eval - Technical - Offeror01.xls" and there will be
several different spreadsheets "...Offeror02", "...Offeror03", etc.

I would like to extract from the file name the Offeror01 part. I've used
this equation befo
=MID(CELL("filename",A1),FIND("[",CELL("filename",A1),1)+1,FIND("]",CELL("filename",A1),1)-FIND("[",CELL("filename",A1),1)-1)

But now (as I said) want to select out that last part.

Any ideas?

Thanks,
MJohn


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
M John
 
Posts: n/a
Default filename search and extract into a cell

Hmm, well, that was easy.
Thanks. Most appreciated.

MJohn

"Dave Peterson" wrote:

Always 9 characters offeror##???

if yes:

=MID(CELL("filename",A1),SEARCH("offeror",CELL("fi lename",A1)),9)



M John wrote:

Here's what I'm looking for....
Say the file name is: "Eval - Technical - Offeror01.xls" and there will be
several different spreadsheets "...Offeror02", "...Offeror03", etc.

I would like to extract from the file name the Offeror01 part. I've used
this equation befo
=MID(CELL("filename",A1),FIND("[",CELL("filename",A1),1)+1,FIND("]",CELL("filename",A1),1)-FIND("[",CELL("filename",A1),1)-1)

But now (as I said) want to select out that last part.

Any ideas?

Thanks,
MJohn


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.misc
M John
 
Posts: n/a
Default filename search and extract into a cell

If the filenames aren't always in that form (offeror##), is there a way to
search for and extract the part between the 2nd space and the "." in the
filename extension?

Thanks,
MJohn

"Dave Peterson" wrote:

Always 9 characters offeror##???

if yes:

=MID(CELL("filename",A1),SEARCH("offeror",CELL("fi lename",A1)),9)



M John wrote:

Here's what I'm looking for....
Say the file name is: "Eval - Technical - Offeror01.xls" and there will be
several different spreadsheets "...Offeror02", "...Offeror03", etc.

I would like to extract from the file name the Offeror01 part. I've used
this equation befo
=MID(CELL("filename",A1),FIND("[",CELL("filename",A1),1)+1,FIND("]",CELL("filename",A1),1)-FIND("[",CELL("filename",A1),1)-1)

But now (as I said) want to select out that last part.

Any ideas?

Thanks,
MJohn


--

Dave Peterson

  #5   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default filename search and extract into a cell

I'd use a couple of cells to make the formulas manageable.

Use your previous formula to extract the workbook name.
(I put it in A1)

Then you can use this formula to get the position of the second space:
=FIND(CHAR(127),SUBSTITUTE(A1," ",CHAR(127),2))
(add one to find the character after the second space:
=FIND(CHAR(127),SUBSTITUTE(A1," ",CHAR(127),2))+1
(I put it in B1)

Then (I bet) each file will end with .xls, so you could just drop that portion:
=MID(A1,B1,LEN(A1)-B1-4+1)
(in C1)

But with a name like: "Eval - Technical - Offeror01.xls"
wouldn't you want the portion after the 4th space character?)
=FIND(CHAR(127),SUBSTITUTE(A1," ",CHAR(127),4))+1



M John wrote:

If the filenames aren't always in that form (offeror##), is there a way to
search for and extract the part between the 2nd space and the "." in the
filename extension?

Thanks,
MJohn

"Dave Peterson" wrote:

Always 9 characters offeror##???

if yes:

=MID(CELL("filename",A1),SEARCH("offeror",CELL("fi lename",A1)),9)



M John wrote:

Here's what I'm looking for....
Say the file name is: "Eval - Technical - Offeror01.xls" and there will be
several different spreadsheets "...Offeror02", "...Offeror03", etc.

I would like to extract from the file name the Offeror01 part. I've used
this equation befo
=MID(CELL("filename",A1),FIND("[",CELL("filename",A1),1)+1,FIND("]",CELL("filename",A1),1)-FIND("[",CELL("filename",A1),1)-1)

But now (as I said) want to select out that last part.

Any ideas?

Thanks,
MJohn


--

Dave Peterson


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.misc
M John
 
Posts: n/a
Default filename search and extract into a cell

Okay. Wow. Thanks. Excellent work.

MJohn

"Dave Peterson" wrote:

I'd use a couple of cells to make the formulas manageable.

Use your previous formula to extract the workbook name.
(I put it in A1)

Then you can use this formula to get the position of the second space:
=FIND(CHAR(127),SUBSTITUTE(A1," ",CHAR(127),2))
(add one to find the character after the second space:
=FIND(CHAR(127),SUBSTITUTE(A1," ",CHAR(127),2))+1
(I put it in B1)

Then (I bet) each file will end with .xls, so you could just drop that portion:
=MID(A1,B1,LEN(A1)-B1-4+1)
(in C1)

But with a name like: "Eval - Technical - Offeror01.xls"
wouldn't you want the portion after the 4th space character?)
=FIND(CHAR(127),SUBSTITUTE(A1," ",CHAR(127),4))+1



M John wrote:

If the filenames aren't always in that form (offeror##), is there a way to
search for and extract the part between the 2nd space and the "." in the
filename extension?

Thanks,
MJohn

"Dave Peterson" wrote:

Always 9 characters offeror##???

if yes:

=MID(CELL("filename",A1),SEARCH("offeror",CELL("fi lename",A1)),9)



M John wrote:

Here's what I'm looking for....
Say the file name is: "Eval - Technical - Offeror01.xls" and there will be
several different spreadsheets "...Offeror02", "...Offeror03", etc.

I would like to extract from the file name the Offeror01 part. I've used
this equation befo
=MID(CELL("filename",A1),FIND("[",CELL("filename",A1),1)+1,FIND("]",CELL("filename",A1),1)-FIND("[",CELL("filename",A1),1)-1)

But now (as I said) want to select out that last part.

Any ideas?

Thanks,
MJohn

--

Dave Peterson


--

Dave Peterson

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I search a cell for a value and extract part of content? Leben Excel Discussion (Misc queries) 1 December 16th 05 09:43 AM
How do I search excel spreadsheets using multiple search criteria. Kasper Excel Worksheet Functions 4 December 15th 05 12:26 AM
Search a worksheet, extract rows using a list from another sheet bobf Excel Discussion (Misc queries) 9 August 31st 05 04:56 AM
looking for range of text in a single cell hatter Excel Discussion (Misc queries) 0 August 29th 05 06:23 PM
Extract phone number front block of text Tech Excel Discussion (Misc queries) 6 August 8th 05 04:07 PM


All times are GMT +1. The time now is 08:21 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"