#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Hyperlink values

Hi,

I have got a column with certain values with each value pointing to a web
address. Now what I need done is, get the values in one columns and links in
other colums. For e.g: In A1, I have "Ben's Kitchen" hyperlinked to
"www.example.com", I want A1= Ben's Kitchen; B1=www.example.com

Any ideas or suggestions?

Thanks very much in advance.

S. Malik
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Hyperlink values

We will use cols A, B, and C. With the hyperlink in col A, in B1 enter"
=A1 this gets the "friendly name"

In C1 enter:

=hyp(A1)

You must also install the following User Defined Function (UDF) to avoid the
#NAME error:

Function hyp(r As Range) As String
hyp = ""
If r.Hyperlinks.Count 0 Then
hyp = r.Hyperlinks(1).Address
Exit Function
End If
If r.HasFormula Then
rf = r.Formula
dq = Chr(34)
If InStr(rf, dq) = 0 Then
Else
hyp = Split(r.Formula, dq)(1)
End If
End If
End Function

User Defined Functions (UDFs) are very easy to install and use:

1. ALT-F11 brings up the VBE window
2. ALT-I
ALT-M opens a fresh module
3. paste the stuff in and close the VBE window

If you save the workbook, the UDF will be saved with it.

To remove the UDF:

1. bring up the VBE window as above
2. clear the code out
3. close the VBE window

To use the UDF from the Excel worksheet:

=hyp(A1)

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

or

http://www.cpearson.com/excel/Writin...ionsInVBA.aspx
for specifics on UDFs

--
Gary''s Student - gsnu200807


"S. Malik" wrote:

Hi,

I have got a column with certain values with each value pointing to a web
address. Now what I need done is, get the values in one columns and links in
other colums. For e.g: In A1, I have "Ben's Kitchen" hyperlinked to
"www.example.com", I want A1= Ben's Kitchen; B1=www.example.com

Any ideas or suggestions?

Thanks very much in advance.

S. Malik

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Hyperlink values

This was really very helpful Gary. Thanks very much. : )


"Gary''s Student" wrote:

We will use cols A, B, and C. With the hyperlink in col A, in B1 enter"
=A1 this gets the "friendly name"

In C1 enter:

=hyp(A1)

You must also install the following User Defined Function (UDF) to avoid the
#NAME error:

Function hyp(r As Range) As String
hyp = ""
If r.Hyperlinks.Count 0 Then
hyp = r.Hyperlinks(1).Address
Exit Function
End If
If r.HasFormula Then
rf = r.Formula
dq = Chr(34)
If InStr(rf, dq) = 0 Then
Else
hyp = Split(r.Formula, dq)(1)
End If
End If
End Function

User Defined Functions (UDFs) are very easy to install and use:

1. ALT-F11 brings up the VBE window
2. ALT-I
ALT-M opens a fresh module
3. paste the stuff in and close the VBE window

If you save the workbook, the UDF will be saved with it.

To remove the UDF:

1. bring up the VBE window as above
2. clear the code out
3. close the VBE window

To use the UDF from the Excel worksheet:

=hyp(A1)

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

or

http://www.cpearson.com/excel/Writin...ionsInVBA.aspx
for specifics on UDFs

--
Gary''s Student - gsnu200807


"S. Malik" wrote:

Hi,

I have got a column with certain values with each value pointing to a web
address. Now what I need done is, get the values in one columns and links in
other colums. For e.g: In A1, I have "Ben's Kitchen" hyperlinked to
"www.example.com", I want A1= Ben's Kitchen; B1=www.example.com

Any ideas or suggestions?

Thanks very much in advance.

S. Malik

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Hyperlink values

You are very welcome!
--
Gary''s Student - gsnu200807


"S. Malik" wrote:

This was really very helpful Gary. Thanks very much. : )


"Gary''s Student" wrote:

We will use cols A, B, and C. With the hyperlink in col A, in B1 enter"
=A1 this gets the "friendly name"

In C1 enter:

=hyp(A1)

You must also install the following User Defined Function (UDF) to avoid the
#NAME error:

Function hyp(r As Range) As String
hyp = ""
If r.Hyperlinks.Count 0 Then
hyp = r.Hyperlinks(1).Address
Exit Function
End If
If r.HasFormula Then
rf = r.Formula
dq = Chr(34)
If InStr(rf, dq) = 0 Then
Else
hyp = Split(r.Formula, dq)(1)
End If
End If
End Function

User Defined Functions (UDFs) are very easy to install and use:

1. ALT-F11 brings up the VBE window
2. ALT-I
ALT-M opens a fresh module
3. paste the stuff in and close the VBE window

If you save the workbook, the UDF will be saved with it.

To remove the UDF:

1. bring up the VBE window as above
2. clear the code out
3. close the VBE window

To use the UDF from the Excel worksheet:

=hyp(A1)

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

or

http://www.cpearson.com/excel/Writin...ionsInVBA.aspx
for specifics on UDFs

--
Gary''s Student - gsnu200807


"S. Malik" wrote:

Hi,

I have got a column with certain values with each value pointing to a web
address. Now what I need done is, get the values in one columns and links in
other colums. For e.g: In A1, I have "Ben's Kitchen" hyperlinked to
"www.example.com", I want A1= Ben's Kitchen; B1=www.example.com

Any ideas or suggestions?

Thanks very much in advance.

S. Malik

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 18
Default Hyperlink values

Thank you Gary's student! Worked like a charm. Is ok to leave function in
workbook or is it better to remove?
--
Mary-Anne in Durban


"S. Malik" wrote:

This was really very helpful Gary. Thanks very much. : )


"Gary''s Student" wrote:

We will use cols A, B, and C. With the hyperlink in col A, in B1 enter"
=A1 this gets the "friendly name"

In C1 enter:

=hyp(A1)

You must also install the following User Defined Function (UDF) to avoid the
#NAME error:

Function hyp(r As Range) As String
hyp = ""
If r.Hyperlinks.Count 0 Then
hyp = r.Hyperlinks(1).Address
Exit Function
End If
If r.HasFormula Then
rf = r.Formula
dq = Chr(34)
If InStr(rf, dq) = 0 Then
Else
hyp = Split(r.Formula, dq)(1)
End If
End If
End Function

User Defined Functions (UDFs) are very easy to install and use:

1. ALT-F11 brings up the VBE window
2. ALT-I
ALT-M opens a fresh module
3. paste the stuff in and close the VBE window

If you save the workbook, the UDF will be saved with it.

To remove the UDF:

1. bring up the VBE window as above
2. clear the code out
3. close the VBE window

To use the UDF from the Excel worksheet:

=hyp(A1)

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

or

http://www.cpearson.com/excel/Writin...ionsInVBA.aspx
for specifics on UDFs

--
Gary''s Student - gsnu200807


"S. Malik" wrote:

Hi,

I have got a column with certain values with each value pointing to a web
address. Now what I need done is, get the values in one columns and links in
other colums. For e.g: In A1, I have "Ben's Kitchen" hyperlinked to
"www.example.com", I want A1= Ben's Kitchen; B1=www.example.com

Any ideas or suggestions?

Thanks very much in advance.

S. Malik



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 18
Default Hyperlink values

I have to admit that I am clueless about macros. However, I followed all
your steps and the function/macro did exactly what I wanted. However..... I
want to remove the function/macro from the worksheet and my computer as it is
slowing the document down something terrible. I followed your steps and
deleted the function in VBE but everytime I open the document the question is
asked if i want to enable the macro. Help! Where is it lurking? How do I
fell the damn beast. It is no longer useful to me
--
Mary-Anne in Durban


"Mary-Anne" wrote:

Thank you Gary's student! Worked like a charm. Is ok to leave function in
workbook or is it better to remove?
--
Mary-Anne in Durban


"S. Malik" wrote:

This was really very helpful Gary. Thanks very much. : )


"Gary''s Student" wrote:

We will use cols A, B, and C. With the hyperlink in col A, in B1 enter"
=A1 this gets the "friendly name"

In C1 enter:

=hyp(A1)

You must also install the following User Defined Function (UDF) to avoid the
#NAME error:

Function hyp(r As Range) As String
hyp = ""
If r.Hyperlinks.Count 0 Then
hyp = r.Hyperlinks(1).Address
Exit Function
End If
If r.HasFormula Then
rf = r.Formula
dq = Chr(34)
If InStr(rf, dq) = 0 Then
Else
hyp = Split(r.Formula, dq)(1)
End If
End If
End Function

User Defined Functions (UDFs) are very easy to install and use:

1. ALT-F11 brings up the VBE window
2. ALT-I
ALT-M opens a fresh module
3. paste the stuff in and close the VBE window

If you save the workbook, the UDF will be saved with it.

To remove the UDF:

1. bring up the VBE window as above
2. clear the code out
3. close the VBE window

To use the UDF from the Excel worksheet:

=hyp(A1)

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

or

http://www.cpearson.com/excel/Writin...ionsInVBA.aspx
for specifics on UDFs

--
Gary''s Student - gsnu200807


"S. Malik" wrote:

Hi,

I have got a column with certain values with each value pointing to a web
address. Now what I need done is, get the values in one columns and links in
other colums. For e.g: In A1, I have "Ben's Kitchen" hyperlinked to
"www.example.com", I want A1= Ben's Kitchen; B1=www.example.com

Any ideas or suggestions?

Thanks very much in advance.

S. Malik

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 18
Default Hyperlink values

OK, Im stumped. I also admit to being absolutely clueless about
macros/functions. However, I followed your steps and it worked like a charm.
Not so trying to dispose of said function/macro. It is slowing my document
down terribly and every time I open the document theres the question again:
Do you want to enable macro? It is obviously lurking somewhere in my
document €¦ on my computer €¦ Where?!!!! How do I find the beast and dispose
of it now that I no longer have a use for it?
--
Mary-Anne in Durban


"Mary-Anne" wrote:

Thank you Gary's student! Worked like a charm. Is ok to leave function in
workbook or is it better to remove?
--
Mary-Anne in Durban


"S. Malik" wrote:

This was really very helpful Gary. Thanks very much. : )


"Gary''s Student" wrote:

We will use cols A, B, and C. With the hyperlink in col A, in B1 enter"
=A1 this gets the "friendly name"

In C1 enter:

=hyp(A1)

You must also install the following User Defined Function (UDF) to avoid the
#NAME error:

Function hyp(r As Range) As String
hyp = ""
If r.Hyperlinks.Count 0 Then
hyp = r.Hyperlinks(1).Address
Exit Function
End If
If r.HasFormula Then
rf = r.Formula
dq = Chr(34)
If InStr(rf, dq) = 0 Then
Else
hyp = Split(r.Formula, dq)(1)
End If
End If
End Function

User Defined Functions (UDFs) are very easy to install and use:

1. ALT-F11 brings up the VBE window
2. ALT-I
ALT-M opens a fresh module
3. paste the stuff in and close the VBE window

If you save the workbook, the UDF will be saved with it.

To remove the UDF:

1. bring up the VBE window as above
2. clear the code out
3. close the VBE window

To use the UDF from the Excel worksheet:

=hyp(A1)

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

or

http://www.cpearson.com/excel/Writin...ionsInVBA.aspx
for specifics on UDFs

--
Gary''s Student - gsnu200807


"S. Malik" wrote:

Hi,

I have got a column with certain values with each value pointing to a web
address. Now what I need done is, get the values in one columns and links in
other colums. For e.g: In A1, I have "Ben's Kitchen" hyperlinked to
"www.example.com", I want A1= Ben's Kitchen; B1=www.example.com

Any ideas or suggestions?

Thanks very much in advance.

S. Malik

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Hyperlink values

Debra Dalgleish shares how to remove the remnants of macros:
http://contextures.com/xlfaqMac.html#NoMacros

Remember to convert those formulas (=hyp()) to values first, or you'll break
them.


Mary-Anne wrote:

I have to admit that I am clueless about macros. However, I followed all
your steps and the function/macro did exactly what I wanted. However..... I
want to remove the function/macro from the worksheet and my computer as it is
slowing the document down something terrible. I followed your steps and
deleted the function in VBE but everytime I open the document the question is
asked if i want to enable the macro. Help! Where is it lurking? How do I
fell the damn beast. It is no longer useful to me
--
Mary-Anne in Durban

"Mary-Anne" wrote:

Thank you Gary's student! Worked like a charm. Is ok to leave function in
workbook or is it better to remove?
--
Mary-Anne in Durban


"S. Malik" wrote:

This was really very helpful Gary. Thanks very much. : )


"Gary''s Student" wrote:

We will use cols A, B, and C. With the hyperlink in col A, in B1 enter"
=A1 this gets the "friendly name"

In C1 enter:

=hyp(A1)

You must also install the following User Defined Function (UDF) to avoid the
#NAME error:

Function hyp(r As Range) As String
hyp = ""
If r.Hyperlinks.Count 0 Then
hyp = r.Hyperlinks(1).Address
Exit Function
End If
If r.HasFormula Then
rf = r.Formula
dq = Chr(34)
If InStr(rf, dq) = 0 Then
Else
hyp = Split(r.Formula, dq)(1)
End If
End If
End Function

User Defined Functions (UDFs) are very easy to install and use:

1. ALT-F11 brings up the VBE window
2. ALT-I
ALT-M opens a fresh module
3. paste the stuff in and close the VBE window

If you save the workbook, the UDF will be saved with it.

To remove the UDF:

1. bring up the VBE window as above
2. clear the code out
3. close the VBE window

To use the UDF from the Excel worksheet:

=hyp(A1)

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

or

http://www.cpearson.com/excel/Writin...ionsInVBA.aspx
for specifics on UDFs

--
Gary''s Student - gsnu200807


"S. Malik" wrote:

Hi,

I have got a column with certain values with each value pointing to a web
address. Now what I need done is, get the values in one columns and links in
other colums. For e.g: In A1, I have "Ben's Kitchen" hyperlinked to
"www.example.com", I want A1= Ben's Kitchen; B1=www.example.com

Any ideas or suggestions?

Thanks very much in advance.

S. Malik


--

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't make hyperlink function work for hyperlink to website Frank B Denman Excel Worksheet Functions 15 February 5th 07 11:01 PM
How do I create a hyperlink to a cell with the hyperlink function S. Bevins Excel Worksheet Functions 2 July 20th 06 08:06 PM
Moving rows with Hyperlink doesn't move hyperlink address Samad Excel Discussion (Misc queries) 15 June 22nd 06 12:03 PM
Getting values from hyperlink Antonio Duarte Excel Discussion (Misc queries) 14 June 14th 05 09:20 PM
Intra-workbook hyperlink: macro/function to return to hyperlink ce marika1981 Excel Discussion (Misc queries) 3 May 6th 05 05:47 AM


All times are GMT +1. The time now is 12:58 PM.

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

About Us

"It's about Microsoft Excel"