Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Amy O
 
Posts: n/a
Default Can I extract text as a value from a formula?

I have a column with the following formula:
='\\Ourcompany\studydata\P_03\Lab\Manifest\Round 2\[Shipment 18 10
4.xls]Sheet1'!H18

and would like to extract the workbook location from it. Is there a formula
to do this? Thanks.
Amy
  #2   Report Post  
tjtjjtjt
 
Posts: n/a
Default

Amy,
By the workbook location, you mean everything before the start of the File
Name but not including the equal sign or the single quote?
In other words, this:
\\Ourcompany\studydata\P_03\Lab\Manifest\Round 2\

If this is correct . . .
If this data is in cell A5, how about:
=MID(A5,FIND("'",A5,1)+1,(FIND("[",A5,1)-FIND("'",A5,1))-1)

tj


"Amy O" wrote:

I have a column with the following formula:
='\\Ourcompany\studydata\P_03\Lab\Manifest\Round 2\[Shipment 18 10
4.xls]Sheet1'!H18

and would like to extract the workbook location from it. Is there a formula
to do this? Thanks.
Amy

  #3   Report Post  
William
 
Posts: n/a
Default

Hi Amy - this may get you started but please note that all the workbooks
which the formulae relate to should be closed.

Place the following into a general module

Function showformul(c As Range)
Application.Volatile
'The following is all one line if the text wraps.
showformul = Left(Right(c.Formula, Len(c.Formula) - 1),
Application.Find("[", Right(c.Formula, Len(c.Formula) - 1)) - 2)
End Function

To return the path from a formula contained in, say, cell C3, use
=showformul(C3)
--
XL2002
Regards

William



"Amy O" <Amy
wrote in message
...
| I have a column with the following formula:
| ='\\Ourcompany\studydata\P_03\Lab\Manifest\Round 2\[Shipment 18 10
| 4.xls]Sheet1'!H18
|
| and would like to extract the workbook location from it. Is there a
formula
| to do this? Thanks.
| Amy


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
Concatenation formula loses text wrap formatting DFM Excel Discussion (Misc queries) 5 December 27th 04 01:45 PM
formula is displaying as text rather than result. Jamie Excel Worksheet Functions 2 December 13th 04 05:33 PM
match cell text with text in formula Todd L. Excel Worksheet Functions 3 December 9th 04 08:11 PM
Logical Text Formula Jim Excel Worksheet Functions 2 December 6th 04 10:37 PM
Extract % from text string Mike Excel Worksheet Functions 5 December 1st 04 08:02 PM


All times are GMT +1. The time now is 02:59 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"