Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
hyperlink formula to its result in same cell
I'm stucked; what am I doing wrong?
problem, get rid of the hyperlink formula and have the name in A show, 'and the link to open when activate1 Arne Sub make_hyperlink() ' Sheet filled with names in A col and their belonging url in B col ' create a hyperlink with the name (A)AND url from (B) in col C ' And remove the formula Hyperlink, but keep the result in C 'Example in COL 'A: Google 'B: http://www.google.com/ 'C: gives Google with hyperlink Dim myrow As Long With ActiveSheet myrow = Range("A" & Rows.Count).End(xlUp).Row Range("C1:C" & myrow).Formula ="=trim(HYPERLINK(RC[-1],RC[-2]))" End With End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
hyperlink formula to its result in same cell
Arne,
If you do not want the HYPERLINK function, don't use it. This is what I got recording a macro of the cell right-clickhyperlink action: ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:= _ "Sheet1!A1", TextToDisplay:="Sheet1!A1" You should be able to change this to include the values of Range("A1") and Range("B1") . NickHK "arne" wrote in message ... I'm stucked; what am I doing wrong? problem, get rid of the hyperlink formula and have the name in A show, 'and the link to open when activate1 Arne Sub make_hyperlink() ' Sheet filled with names in A col and their belonging url in B col ' create a hyperlink with the name (A)AND url from (B) in col C ' And remove the formula Hyperlink, but keep the result in C 'Example in COL 'A: Google 'B: http://www.google.com/ 'C: gives Google with hyperlink Dim myrow As Long With ActiveSheet myrow = Range("A" & Rows.Count).End(xlUp).Row Range("C1:C" & myrow).Formula ="=trim(HYPERLINK(RC[-1],RC[-2]))" End With End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Paste Hyperlink result as working hyperlink | Excel Worksheet Functions | |||
Formula Bar F9 Result differs from cell result??? | Excel Worksheet Functions | |||
copying the Hyperlink function result without copying the actual formula | Excel Worksheet Functions | |||
Advanced formula - Return result & Show Cell Reference of result | Excel Worksheet Functions | |||
Question: Cell formula or macro to write result of one cell to another cell | Excel Programming |