If I correctly understand Nader's requirement he would like to
hyperlink each cell in one sheet to the corresponding cell in a second
sheet (not all cells to cell A1 of the second sheet). I am not aware
of a simple copy and paste route that would accomplish that, but can
offer the following macro which accomplishes this for the selected
range:

Const TARGETSHEET = "Sheet1"

Sub LinkToCellsInAnotherSheet()
    If ActiveSheet.Name = TARGETSHEET Then Exit Sub
    Dim rCell As Range
    Dim txtToDisplay As String
    For Each rCell In Selection
        If IsEmpty(rCell) Then
            txtToDisplay = " "
        Else
            txtToDisplay = rCell.Value
        End If
        ActiveSheet.Hyperlinks.Add Anchor:=rCell, Address:="",
SubAddress:=TARGETSHEET & "!" & rCell.Address,
TextToDisplay:=txtToDisplay
    Next rCell
End Sub

Hope this helped,
Rolf


On Oct 9, 8:51 pm, "Upendra Singh" <upendrasinghsen...@gmail.com>
wrote:
> Hi Nader,
>
> You can do this in one Go.
> Activate the second sheet. In the Cell A1, write "=" without double quotes
> and then go to Sheet 1 and select A1.
> Press enter.
> Press F5 and enter the last cell till where you want to hyperlink (say M500)
> Press Shift Enter.
> Press F2 and Ctrl+Enter.
> This will hyperlink all the cell from A1 to M500
>
> Thanks and Regards,
>
> Upendra Singh
> +91-9910227325
>
>
>
> -----Original Message-----
> From: excel-macros@googlegroups.com [mailto:excel-mac...@googlegroups.com]
>
> On Behalf Of nader
> Sent: Friday, October 09, 2009 7:54 PM
> To: MS EXCEL AND VBA MACROS
> Subject: $$Excel-Macros$$ heyerlinking many cells
>
> Hello,
>
> I am trying to hyperlink many cells from one sheet to another one in
> the same excel file but I can not copy and paste the first hyperlinked
> cell to other cell because it always goes to the first cell.
> E.g. I want to hyperlink cell A1 in first sheet to cell A1 in second
> sheet and then A2 to A2, .. A500 to A500.
>
> Anybody knows how to do this?
> I really appreciate your help
> Nader- Hide quoted text -
>
> - Show quoted text -

--~--~---------~--~----~------------~-------~--~----~
----------------------------------------------------------------------------------
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~----------~----~----~----~------~----~------~--~---

Reply via email to