SchMoke
asked on
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?
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?
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.
ASKER
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?
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
"http://www.yahoo.com", TextToDisplay:="LINK"
This will shift only the values in Column A down and insert a link in A5.
- Ardhendu
ASKER
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
Range("whatever cell i click on").select
because I may want to insert a space in another row in the column
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Worked like a charm!
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
"http://www.yahoo.com", TextToDisplay:="LINK"
- Ardhendu