Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can I search a cell for a value and extract part of content? | Excel Discussion (Misc queries) | |||
How do I search excel spreadsheets using multiple search criteria. | Excel Worksheet Functions | |||
Search a worksheet, extract rows using a list from another sheet | Excel Discussion (Misc queries) | |||
looking for range of text in a single cell | Excel Discussion (Misc queries) | |||
Extract phone number front block of text | Excel Discussion (Misc queries) |