Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
rabbit ribbit
 
Posts: n/a
Default evaluate HYPERLINK()

I use Microsoft Query to query a database and return data back to excel. One
column returned contains data for hyperlinks. In SQL, the column returns a
text string '=HYPERLINK("http://www.microsoft.com", "MSFT")'. Instead of
displaying "MSFT" in the excel cell, the whole string (i.e.
"=HYPERLINK(....)") is displayed.

Is there a way to force evaluation of the string contained in a cell?
  #2   Report Post  
Basil
 
Posts: n/a
Default

To be honest, I'm not sure how to evaluate a string that represents a formula
(although if there is nothing to force the cell to be text (eg a leading '),
calculate now?).

However, since nobody has replied yet, I thought I'd give a possible work
around.

If you are prepared to use another column, you could derive what you are
after from that - this is a bit crude and is dependant on your web address
having no "," in it.

Say the text is in cell A1. The following formula should return the text you
desi

=MID(LEFT(A1,LEN(A1)-2),SEARCH(",",A1)+3,258)

I have assumed that there will always be a space after the comma in the
formula (coming from a single source where the formula is actually used, I
would say this would be consistent). The 258 allows for the 255 character
limit plus the leading , "

This would only give you the text - if you actually wanted to keep the
hyperlink, you can use:

=HYPERLINK(RIGHT(LEFT(A1,A4-2),A4-A3-3),MID(LEFT(A1,LEN(A1)-2),SEARCH(",",A1)+3,258))

Oh, and if there is actually no space after the comma, replace (",",A1)+3 in
the code with (",",A1)+2

I know it is crude, but until someone comes up with a solution, maybe this
will help

Baz

"rabbit ribbit" wrote:

I use Microsoft Query to query a database and return data back to excel. One
column returned contains data for hyperlinks. In SQL, the column returns a
text string '=HYPERLINK("http://www.microsoft.com", "MSFT")'. Instead of
displaying "MSFT" in the excel cell, the whole string (i.e.
"=HYPERLINK(....)") is displayed.

Is there a way to force evaluation of the string contained in a cell?

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
Moving rows with Hyperlink doesn't move hyperlink address Samad Excel Discussion (Misc queries) 15 June 22nd 06 12:03 PM
Intra-workbook hyperlink: macro/function to return to hyperlink ce marika1981 Excel Discussion (Misc queries) 3 May 6th 05 05:47 AM
Hyperlink Length Jason Excel Worksheet Functions 0 January 14th 05 05:49 PM
Removing hyperlink Frank Marousek Excel Discussion (Misc queries) 3 January 12th 05 09:53 PM
How can I extract hyperlink value pat_rick Excel Discussion (Misc queries) 1 January 8th 05 01:17 AM


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