Insert Cell Link in Excel

Hello all.

I have an excel spreadsheet with 3 columns of information.  I have another column with hyperlinks that execute macros.  Is it possible to select an area inside the Information cell range that I want to insert a row and push the 3 cells of information down a cell?

SchMokeAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Ardhendu SarangiConnect With a Mentor Sr. Project ManagerCommented:
If you want to click a cell, then you can try something like this .....

But remember that this will work only on one cell to insert the hyperlink.

- Ardhendu

Sub Newcode()
Dim rngX As Range
 
Set rngX = Application.InputBox(Prompt:="Please click on a cell with your mouse to insert the link.", _
                    Title:="SPECIFY RANGE", Type:=8)
rngX.Select
  Selection.Insert Shift:=xlDown
  ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= _
       "http://www.yahoo.com", TextToDisplay:="LINK"
End Sub

Open in new window

0
 
Ardhendu SarangiSr. Project ManagerCommented:
>>> Is it possible to select an area inside the Information cell range that I want to insert a row and push the 3 cells of information down a cell?

Yes, it is absolutely possible and there are also many ways to get this done. Here's one way that you can try:

After you select the desired cells you can use something similar.


Range("A2:C2".select
Selection.Insert Shift:=xlDown

This will move the cells down. To add a hyperlink you can use something like this:

    Range("A1").Select
    ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= _
        "http://www.yahoo.com", TextToDisplay:="LINK"

- Ardhendu

0
 
Jerry PaladinoCommented:
Highlight the three cells you want to move down and right mouse click.  On the sub menu that displays select Insert.  In the dialog box that displays select Move Cells Down.
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
SchMokeAuthor Commented:
Hey pari123, that is close to what i need but lets say I have in A4 the value "Dog" and in A6 the value "Cat".  I want to be able to click on A5 and then click the link and it will push "Cat" to A7.  Can the link do that?
0
 
Ardhendu SarangiSr. Project ManagerCommented:

If you want to insert a link in A5, then your code will look something similar to this...

   Range("A5").select
   Selection.Insert Shift:=xlDown
   ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= _
        "http://www.yahoo.com", TextToDisplay:="LINK"

This will shift only the values in Column A down and insert a link in A5.

- Ardhendu
0
 
SchMokeAuthor Commented:
Ahhhh so how do I pass the Active cell to


Range("whatever cell i click on").select

because I may want to insert a space in another row in the column
0
 
SchMokeAuthor Commented:
Worked like a charm!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.