Add external hyperlink to Excel activesheet

vancouverjackluo

New Member
Joined
Jul 28, 2015
Messages
2
I would like to add a hyperlink(of its file path - sName+sPath) to each cell in row "A" on my activesheet, I couldn't find a way to do it without overhaul the whole thing.
It would be great if you can help out.
Many thanks.
Here is what I got:
Code:
[COLOR=black][FONT=Consolas]  [/FONT][/COLOR][COLOR=#00008B][FONT=Consolas]Sub[/FONT][/COLOR][COLOR=black][FONT=Consolas] PendingReviewers[/FONT][/COLOR][COLOR=black][FONT=Consolas]()[/FONT][/COLOR]
<code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit;">[COLOR=black]  [/COLOR][COLOR=#00008B]Dim[/COLOR][COLOR=black] sPath [/COLOR][COLOR=#00008B]As[/COLOR][COLOR=black] [/COLOR][COLOR=#00008B]String[/COLOR][COLOR=black],[/COLOR][COLOR=black] sName [/COLOR][COLOR=#00008B]As[/COLOR][COLOR=black] [/COLOR][COLOR=#00008B]String[/COLOR][COLOR=black]
  [/COLOR][COLOR=#00008B]Dim[/COLOR][COLOR=black] bk [/COLOR][COLOR=#00008B]As[/COLOR][COLOR=black] Workbook[/COLOR][COLOR=black],[/COLOR][COLOR=black] sh [/COLOR][COLOR=#00008B]As[/COLOR][COLOR=black] Worksheet
  [/COLOR][COLOR=#00008B]Dim[/COLOR][COLOR=black] rw [/COLOR][COLOR=#00008B]As[/COLOR][COLOR=black] [/COLOR][COLOR=#00008B]Long[/COLOR][COLOR=black]

  [/COLOR][COLOR=#00008B]Set[/COLOR][COLOR=black] sh [/COLOR][COLOR=black]=[/COLOR][COLOR=black] ActiveSheet  [/COLOR][COLOR=gray]'[/COLOR][COLOR=black]

  sh[/COLOR][COLOR=black].[/COLOR][COLOR=black]Cells[/COLOR][COLOR=black].[/COLOR][COLOR=black]ClearContents

         cRow [/COLOR][COLOR=black]=[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]1[/COLOR][COLOR=black]
         sh[/COLOR][COLOR=black].[/COLOR][COLOR=black]Cells[/COLOR][COLOR=black]([/COLOR][COLOR=black]cRow[/COLOR][COLOR=black],[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]1[/COLOR][COLOR=black])[/COLOR][COLOR=black] [/COLOR][COLOR=black]=[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]"Document Name"[/COLOR][COLOR=black]
         sh[/COLOR][COLOR=black].[/COLOR][COLOR=black]Cells[/COLOR][COLOR=black]([/COLOR][COLOR=black]cRow[/COLOR][COLOR=black],[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]2[/COLOR][COLOR=black])[/COLOR][COLOR=black] [/COLOR][COLOR=black]=[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]"Reviewer"[/COLOR][COLOR=black]
         sh[/COLOR][COLOR=black].[/COLOR][COLOR=black]Cells[/COLOR][COLOR=black]([/COLOR][COLOR=black]cRow[/COLOR][COLOR=black],[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]3[/COLOR][COLOR=black])[/COLOR][COLOR=black] [/COLOR][COLOR=black]=[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]"Decision"[/COLOR][COLOR=black] [/COLOR][COLOR=gray]'H5[/COLOR][COLOR=black]

     rw [/COLOR][COLOR=black]=[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]2[/COLOR][COLOR=black] [/COLOR][COLOR=gray]'  row to write[/COLOR][COLOR=black]
     sPath [/COLOR][COLOR=black]=[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]"P:\ISO 9001 Documents\Review Documents\"[/COLOR][COLOR=black] [/COLOR][COLOR=gray]' Dir for file location[/COLOR][COLOR=black]
     sName [/COLOR][COLOR=black]=[/COLOR][COLOR=black] Dir[/COLOR][COLOR=black]([/COLOR][COLOR=black]sPath [/COLOR][COLOR=black]&[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]"*QDRS.xlsx"[/COLOR][COLOR=black])[/COLOR][COLOR=black] [/COLOR][COLOR=gray]' for xl2010 & "*.xlsx"[/COLOR][COLOR=black]
     [/COLOR][COLOR=#00008B]Do[/COLOR][COLOR=black] [/COLOR][COLOR=#00008B]While[/COLOR][COLOR=black] sName [/COLOR][COLOR=black]<>[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]""[/COLOR][COLOR=black] [/COLOR][COLOR=gray]'Loop until filename is blank[/COLOR][COLOR=black]
     [/COLOR][COLOR=#00008B]Set[/COLOR][COLOR=black] bk [/COLOR][COLOR=black]=[/COLOR][COLOR=black] Workbooks[/COLOR][COLOR=black].[/COLOR][COLOR=black]Open[/COLOR][COLOR=black]([/COLOR][COLOR=black]sPath [/COLOR][COLOR=black]&[/COLOR][COLOR=black] sName[/COLOR][COLOR=black])[/COLOR][COLOR=black]

     sh[/COLOR][COLOR=black].[/COLOR][COLOR=black]Cells[/COLOR][COLOR=black]([/COLOR][COLOR=black]rw[/COLOR][COLOR=black],[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]"A"[/COLOR][COLOR=black])[/COLOR][COLOR=black] [/COLOR][COLOR=black]=[/COLOR][COLOR=black] bk[/COLOR][COLOR=black].[/COLOR][COLOR=black]Name
     sh[/COLOR][COLOR=black].[/COLOR][COLOR=black]Cells[/COLOR][COLOR=black]([/COLOR][COLOR=black]rw[/COLOR][COLOR=black],[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]"B"[/COLOR][COLOR=black])[/COLOR][COLOR=black] [/COLOR][COLOR=black]=[/COLOR][COLOR=black] bk[/COLOR][COLOR=black].[/COLOR][COLOR=black]Worksheets[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]2[/COLOR][COLOR=black]).[/COLOR][COLOR=black]Range[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]"B39"[/COLOR][COLOR=black])[/COLOR][COLOR=black]
     sh[/COLOR][COLOR=black].[/COLOR][COLOR=black]Cells[/COLOR][COLOR=black]([/COLOR][COLOR=black]rw[/COLOR][COLOR=black],[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]"C"[/COLOR][COLOR=black])[/COLOR][COLOR=black] [/COLOR][COLOR=black]=[/COLOR][COLOR=black] bk[/COLOR][COLOR=black].[/COLOR][COLOR=black]Worksheets[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]2[/COLOR][COLOR=black]).[/COLOR][COLOR=black]Range[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]"H39"[/COLOR][COLOR=black])[/COLOR][COLOR=black]
     sh[/COLOR][COLOR=black].[/COLOR][COLOR=black]Cells[/COLOR][COLOR=black]([/COLOR][COLOR=black]rw[/COLOR][COLOR=black],[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]"D"[/COLOR][COLOR=black])[/COLOR][COLOR=black] [/COLOR][COLOR=black]=[/COLOR][COLOR=black] bk[/COLOR][COLOR=black].[/COLOR][COLOR=black]Worksheets[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]2[/COLOR][COLOR=black]).[/COLOR][COLOR=black]Range[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]"K39"[/COLOR][COLOR=black])[/COLOR][COLOR=black]
     sh[/COLOR][COLOR=black].[/COLOR][COLOR=black]Cells[/COLOR][COLOR=black]([/COLOR][COLOR=black]rw[/COLOR][COLOR=black],[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]"E"[/COLOR][COLOR=black])[/COLOR][COLOR=black] [/COLOR][COLOR=black]=[/COLOR][COLOR=black] bk[/COLOR][COLOR=black].[/COLOR][COLOR=black]Worksheets[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]2[/COLOR][COLOR=black]).[/COLOR][COLOR=black]Range[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]"B48"[/COLOR][COLOR=black])[/COLOR][COLOR=black]
     sh[/COLOR][COLOR=black].[/COLOR][COLOR=black]Cells[/COLOR][COLOR=black]([/COLOR][COLOR=black]rw[/COLOR][COLOR=black],[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]"F"[/COLOR][COLOR=black])[/COLOR][COLOR=black] [/COLOR][COLOR=black]=[/COLOR][COLOR=black] bk[/COLOR][COLOR=black].[/COLOR][COLOR=black]Worksheets[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]2[/COLOR][COLOR=black]).[/COLOR][COLOR=black]Range[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]"I48"[/COLOR][COLOR=black])[/COLOR][COLOR=black]
     sh[/COLOR][COLOR=black].[/COLOR][COLOR=black]Cells[/COLOR][COLOR=black]([/COLOR][COLOR=black]rw[/COLOR][COLOR=black],[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]"G"[/COLOR][COLOR=black])[/COLOR][COLOR=black] [/COLOR][COLOR=black]=[/COLOR][COLOR=black] bk[/COLOR][COLOR=black].[/COLOR][COLOR=black]Worksheets[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]2[/COLOR][COLOR=black]).[/COLOR][COLOR=black]Range[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]"G4"[/COLOR][COLOR=black])[/COLOR][COLOR=black]
     sh[/COLOR][COLOR=black].[/COLOR][COLOR=black]Cells[/COLOR][COLOR=black]([/COLOR][COLOR=black]rw[/COLOR][COLOR=black],[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]"H"[/COLOR][COLOR=black])[/COLOR][COLOR=black] [/COLOR][COLOR=black]=[/COLOR][COLOR=black] bk[/COLOR][COLOR=black].[/COLOR][COLOR=black]Worksheets[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]2[/COLOR][COLOR=black]).[/COLOR][COLOR=black]Range[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]"B32"[/COLOR][COLOR=black])[/COLOR][COLOR=black]
     sh[/COLOR][COLOR=black].[/COLOR][COLOR=black]Cells[/COLOR][COLOR=black]([/COLOR][COLOR=black]rw[/COLOR][COLOR=black],[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]"I"[/COLOR][COLOR=black])[/COLOR][COLOR=black] [/COLOR][COLOR=black]=[/COLOR][COLOR=black] bk[/COLOR][COLOR=black].[/COLOR][COLOR=black]Worksheets[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]2[/COLOR][COLOR=black]).[/COLOR][COLOR=black]Range[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]"D39"[/COLOR][COLOR=black])[/COLOR][COLOR=black]
       rw [/COLOR][COLOR=black]=[/COLOR][COLOR=black] rw [/COLOR][COLOR=black]+[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]1[/COLOR][COLOR=black]
     sh[/COLOR][COLOR=black].[/COLOR][COLOR=black]Cells[/COLOR][COLOR=black]([/COLOR][COLOR=black]rw[/COLOR][COLOR=black],[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]"A"[/COLOR][COLOR=black])[/COLOR][COLOR=black] [/COLOR][COLOR=black]=[/COLOR][COLOR=black] bk[/COLOR][COLOR=black].[/COLOR][COLOR=black]Name
     sh[/COLOR][COLOR=black].[/COLOR][COLOR=black]Cells[/COLOR][COLOR=black]([/COLOR][COLOR=black]rw[/COLOR][COLOR=black],[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]"B"[/COLOR][COLOR=black])[/COLOR][COLOR=black] [/COLOR][COLOR=black]=[/COLOR][COLOR=black] bk[/COLOR][COLOR=black].[/COLOR][COLOR=black]Worksheets[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]2[/COLOR][COLOR=black]).[/COLOR][COLOR=black]Range[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]"B40"[/COLOR][COLOR=black])[/COLOR][COLOR=black]
     sh[/COLOR][COLOR=black].[/COLOR][COLOR=black]Cells[/COLOR][COLOR=black]([/COLOR][COLOR=black]rw[/COLOR][COLOR=black],[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]"C"[/COLOR][COLOR=black])[/COLOR][COLOR=black] [/COLOR][COLOR=black]=[/COLOR][COLOR=black] bk[/COLOR][COLOR=black].[/COLOR][COLOR=black]Worksheets[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]2[/COLOR][COLOR=black]).[/COLOR][COLOR=black]Range[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]"H40"[/COLOR][COLOR=black])[/COLOR][COLOR=black]
     sh[/COLOR][COLOR=black].[/COLOR][COLOR=black]Cells[/COLOR][COLOR=black]([/COLOR][COLOR=black]rw[/COLOR][COLOR=black],[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]"D"[/COLOR][COLOR=black])[/COLOR][COLOR=black] [/COLOR][COLOR=black]=[/COLOR][COLOR=black] bk[/COLOR][COLOR=black].[/COLOR][COLOR=black]Worksheets[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]2[/COLOR][COLOR=black]).[/COLOR][COLOR=black]Range[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]"K40"[/COLOR][COLOR=black])[/COLOR][COLOR=black]
     sh[/COLOR][COLOR=black].[/COLOR][COLOR=black]Cells[/COLOR][COLOR=black]([/COLOR][COLOR=black]rw[/COLOR][COLOR=black],[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]"I"[/COLOR][COLOR=black])[/COLOR][COLOR=black] [/COLOR][COLOR=black]=[/COLOR][COLOR=black] bk[/COLOR][COLOR=black].[/COLOR][COLOR=black]Worksheets[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]2[/COLOR][COLOR=black]).[/COLOR][COLOR=black]Range[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]"D40"[/COLOR][COLOR=black])[/COLOR][COLOR=black]
       rw [/COLOR][COLOR=black]=[/COLOR][COLOR=black] rw [/COLOR][COLOR=black]+[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]1[/COLOR][COLOR=black]
     sh[/COLOR][COLOR=black].[/COLOR][COLOR=black]Cells[/COLOR][COLOR=black]([/COLOR][COLOR=black]rw[/COLOR][COLOR=black],[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]"A"[/COLOR][COLOR=black])[/COLOR][COLOR=black] [/COLOR][COLOR=black]=[/COLOR][COLOR=black] bk[/COLOR][COLOR=black].[/COLOR][COLOR=black]Name
     sh[/COLOR][COLOR=black].[/COLOR][COLOR=black]Cells[/COLOR][COLOR=black]([/COLOR][COLOR=black]rw[/COLOR][COLOR=black],[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]"B"[/COLOR][COLOR=black])[/COLOR][COLOR=black] [/COLOR][COLOR=black]=[/COLOR][COLOR=black] bk[/COLOR][COLOR=black].[/COLOR][COLOR=black]Worksheets[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]2[/COLOR][COLOR=black]).[/COLOR][COLOR=black]Range[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]"B41"[/COLOR][COLOR=black])[/COLOR][COLOR=black]
     sh[/COLOR][COLOR=black].[/COLOR][COLOR=black]Cells[/COLOR][COLOR=black]([/COLOR][COLOR=black]rw[/COLOR][COLOR=black],[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]"C"[/COLOR][COLOR=black])[/COLOR][COLOR=black] [/COLOR][COLOR=black]=[/COLOR][COLOR=black] bk[/COLOR][COLOR=black].[/COLOR][COLOR=black]Worksheets[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]2[/COLOR][COLOR=black]).[/COLOR][COLOR=black]Range[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]"H41"[/COLOR][COLOR=black])[/COLOR][COLOR=black]
     sh[/COLOR][COLOR=black].[/COLOR][COLOR=black]Cells[/COLOR][COLOR=black]([/COLOR][COLOR=black]rw[/COLOR][COLOR=black],[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]"D"[/COLOR][COLOR=black])[/COLOR][COLOR=black] [/COLOR][COLOR=black]=[/COLOR][COLOR=black] bk[/COLOR][COLOR=black].[/COLOR][COLOR=black]Worksheets[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]2[/COLOR][COLOR=black]).[/COLOR][COLOR=black]Range[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]"K41"[/COLOR][COLOR=black])[/COLOR][COLOR=black]
     sh[/COLOR][COLOR=black].[/COLOR][COLOR=black]Cells[/COLOR][COLOR=black]([/COLOR][COLOR=black]rw[/COLOR][COLOR=black],[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]"I"[/COLOR][COLOR=black])[/COLOR][COLOR=black] [/COLOR][COLOR=black]=[/COLOR][COLOR=black] bk[/COLOR][COLOR=black].[/COLOR][COLOR=black]Worksheets[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]2[/COLOR][COLOR=black]).[/COLOR][COLOR=black]Range[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]"D41"[/COLOR][COLOR=black])[/COLOR][COLOR=black]
        rw [/COLOR][COLOR=black]=[/COLOR][COLOR=black] rw [/COLOR][COLOR=black]+[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]1[/COLOR][COLOR=black]
     sh[/COLOR][COLOR=black].[/COLOR][COLOR=black]Cells[/COLOR][COLOR=black]([/COLOR][COLOR=black]rw[/COLOR][COLOR=black],[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]"A"[/COLOR][COLOR=black])[/COLOR][COLOR=black] [/COLOR][COLOR=black]=[/COLOR][COLOR=black] bk[/COLOR][COLOR=black].[/COLOR][COLOR=black]Name
     sh[/COLOR][COLOR=black].[/COLOR][COLOR=black]Cells[/COLOR][COLOR=black]([/COLOR][COLOR=black]rw[/COLOR][COLOR=black],[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]"B"[/COLOR][COLOR=black])[/COLOR][COLOR=black] [/COLOR][COLOR=black]=[/COLOR][COLOR=black] bk[/COLOR][COLOR=black].[/COLOR][COLOR=black]Worksheets[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]2[/COLOR][COLOR=black]).[/COLOR][COLOR=black]Range[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]"B42"[/COLOR][COLOR=black])[/COLOR][COLOR=black]
     sh[/COLOR][COLOR=black].[/COLOR][COLOR=black]Cells[/COLOR][COLOR=black]([/COLOR][COLOR=black]rw[/COLOR][COLOR=black],[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]"C"[/COLOR][COLOR=black])[/COLOR][COLOR=black] [/COLOR][COLOR=black]=[/COLOR][COLOR=black] bk[/COLOR][COLOR=black].[/COLOR][COLOR=black]Worksheets[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]2[/COLOR][COLOR=black]).[/COLOR][COLOR=black]Range[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]"H42"[/COLOR][COLOR=black])[/COLOR][COLOR=black]
     sh[/COLOR][COLOR=black].[/COLOR][COLOR=black]Cells[/COLOR][COLOR=black]([/COLOR][COLOR=black]rw[/COLOR][COLOR=black],[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]"D"[/COLOR][COLOR=black])[/COLOR][COLOR=black] [/COLOR][COLOR=black]=[/COLOR][COLOR=black] bk[/COLOR][COLOR=black].[/COLOR][COLOR=black]Worksheets[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]2[/COLOR][COLOR=black]).[/COLOR][COLOR=black]Range[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]"K42"[/COLOR][COLOR=black])[/COLOR][COLOR=black]
     sh[/COLOR][COLOR=black].[/COLOR][COLOR=black]Cells[/COLOR][COLOR=black]([/COLOR][COLOR=black]rw[/COLOR][COLOR=black],[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]"I"[/COLOR][COLOR=black])[/COLOR][COLOR=black] [/COLOR][COLOR=black]=[/COLOR][COLOR=black] bk[/COLOR][COLOR=black].[/COLOR][COLOR=black]Worksheets[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]2[/COLOR][COLOR=black]).[/COLOR][COLOR=black]Range[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]"D42"[/COLOR][COLOR=black])[/COLOR][COLOR=black]
        rw [/COLOR][COLOR=black]=[/COLOR][COLOR=black] rw [/COLOR][COLOR=black]+[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]1[/COLOR][COLOR=black]
     sh[/COLOR][COLOR=black].[/COLOR][COLOR=black]Cells[/COLOR][COLOR=black]([/COLOR][COLOR=black]rw[/COLOR][COLOR=black],[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]"A"[/COLOR][COLOR=black])[/COLOR][COLOR=black] [/COLOR][COLOR=black]=[/COLOR][COLOR=black] bk[/COLOR][COLOR=black].[/COLOR][COLOR=black]Name
     sh[/COLOR][COLOR=black].[/COLOR][COLOR=black]Cells[/COLOR][COLOR=black]([/COLOR][COLOR=black]rw[/COLOR][COLOR=black],[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]"B"[/COLOR][COLOR=black])[/COLOR][COLOR=black] [/COLOR][COLOR=black]=[/COLOR][COLOR=black] bk[/COLOR][COLOR=black].[/COLOR][COLOR=black]Worksheets[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]2[/COLOR][COLOR=black]).[/COLOR][COLOR=black]Range[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]"B43"[/COLOR][COLOR=black])[/COLOR][COLOR=black]
     sh[/COLOR][COLOR=black].[/COLOR][COLOR=black]Cells[/COLOR][COLOR=black]([/COLOR][COLOR=black]rw[/COLOR][COLOR=black],[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]"C"[/COLOR][COLOR=black])[/COLOR][COLOR=black] [/COLOR][COLOR=black]=[/COLOR][COLOR=black] bk[/COLOR][COLOR=black].[/COLOR][COLOR=black]Worksheets[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]2[/COLOR][COLOR=black]).[/COLOR][COLOR=black]Range[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]"H43"[/COLOR][COLOR=black])[/COLOR][COLOR=black]
     sh[/COLOR][COLOR=black].[/COLOR][COLOR=black]Cells[/COLOR][COLOR=black]([/COLOR][COLOR=black]rw[/COLOR][COLOR=black],[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]"D"[/COLOR][COLOR=black])[/COLOR][COLOR=black] [/COLOR][COLOR=black]=[/COLOR][COLOR=black] bk[/COLOR][COLOR=black].[/COLOR][COLOR=black]Worksheets[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]2[/COLOR][COLOR=black]).[/COLOR][COLOR=black]Range[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]"K43"[/COLOR][COLOR=black])[/COLOR][COLOR=black]
     sh[/COLOR][COLOR=black].[/COLOR][COLOR=black]Cells[/COLOR][COLOR=black]([/COLOR][COLOR=black]rw[/COLOR][COLOR=black],[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]"I"[/COLOR][COLOR=black])[/COLOR][COLOR=black] [/COLOR][COLOR=black]=[/COLOR][COLOR=black] bk[/COLOR][COLOR=black].[/COLOR][COLOR=black]Worksheets[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]2[/COLOR][COLOR=black]).[/COLOR][COLOR=black]Range[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]"D43"[/COLOR][COLOR=black])[/COLOR][COLOR=black]
        rw [/COLOR][COLOR=black]=[/COLOR][COLOR=black] rw [/COLOR][COLOR=black]+[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]1[/COLOR][COLOR=black]
     sh[/COLOR][COLOR=black].[/COLOR][COLOR=black]Cells[/COLOR][COLOR=black]([/COLOR][COLOR=black]rw[/COLOR][COLOR=black],[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]"A"[/COLOR][COLOR=black])[/COLOR][COLOR=black] [/COLOR][COLOR=black]=[/COLOR][COLOR=black] bk[/COLOR][COLOR=black].[/COLOR][COLOR=black]Name
     sh[/COLOR][COLOR=black].[/COLOR][COLOR=black]Cells[/COLOR][COLOR=black]([/COLOR][COLOR=black]rw[/COLOR][COLOR=black],[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]"B"[/COLOR][COLOR=black])[/COLOR][COLOR=black] [/COLOR][COLOR=black]=[/COLOR][COLOR=black] bk[/COLOR][COLOR=black].[/COLOR][COLOR=black]Worksheets[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]2[/COLOR][COLOR=black]).[/COLOR][COLOR=black]Range[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]"B44"[/COLOR][COLOR=black])[/COLOR][COLOR=black]
     sh[/COLOR][COLOR=black].[/COLOR][COLOR=black]Cells[/COLOR][COLOR=black]([/COLOR][COLOR=black]rw[/COLOR][COLOR=black],[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]"C"[/COLOR][COLOR=black])[/COLOR][COLOR=black] [/COLOR][COLOR=black]=[/COLOR][COLOR=black] bk[/COLOR][COLOR=black].[/COLOR][COLOR=black]Worksheets[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]2[/COLOR][COLOR=black]).[/COLOR][COLOR=black]Range[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]"H44"[/COLOR][COLOR=black])[/COLOR][COLOR=black]
     sh[/COLOR][COLOR=black].[/COLOR][COLOR=black]Cells[/COLOR][COLOR=black]([/COLOR][COLOR=black]rw[/COLOR][COLOR=black],[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]"D"[/COLOR][COLOR=black])[/COLOR][COLOR=black] [/COLOR][COLOR=black]=[/COLOR][COLOR=black] bk[/COLOR][COLOR=black].[/COLOR][COLOR=black]Worksheets[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]2[/COLOR][COLOR=black]).[/COLOR][COLOR=black]Range[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]"K44"[/COLOR][COLOR=black])[/COLOR][COLOR=black]
     sh[/COLOR][COLOR=black].[/COLOR][COLOR=black]Cells[/COLOR][COLOR=black]([/COLOR][COLOR=black]rw[/COLOR][COLOR=black],[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]"I"[/COLOR][COLOR=black])[/COLOR][COLOR=black] [/COLOR][COLOR=black]=[/COLOR][COLOR=black] bk[/COLOR][COLOR=black].[/COLOR][COLOR=black]Worksheets[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]2[/COLOR][COLOR=black]).[/COLOR][COLOR=black]Range[/COLOR][COLOR=black]([/COLOR][COLOR=maroon]"D44"[/COLOR][COLOR=black])[/COLOR][COLOR=black]


       rw [/COLOR][COLOR=black]=[/COLOR][COLOR=black] rw [/COLOR][COLOR=black]+[/COLOR][COLOR=black] [/COLOR][COLOR=maroon]1[/COLOR][COLOR=black]

      bk[/COLOR][COLOR=black].[/COLOR][COLOR=black]Close SaveChanges[/COLOR][COLOR=black]:=[/COLOR][COLOR=maroon]False[/COLOR][COLOR=black]
     sName [/COLOR][COLOR=black]=[/COLOR][COLOR=black] Dir[/COLOR][COLOR=black]()[/COLOR][COLOR=black]
     [/COLOR][COLOR=#00008B]Loop[/COLOR][COLOR=black]
 [/COLOR]</code>[COLOR=black][FONT=Consolas]     [/FONT][/COLOR][COLOR=#00008B][FONT=Consolas]End[/FONT][/COLOR][COLOR=black][FONT=Consolas] [/FONT][/COLOR][COLOR=#00008B][FONT=Consolas]Sub

[/FONT][/COLOR]
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
A hyperlink can be added like this

Code:
A = Range("A1").value
ActiveSheet.Hyperlinks.Add Anchor:=Range("A1"), Address:=A, TextToDisplay:=A

In this example, I overwrote the cell that contained the hyperlink text.
 
Upvote 0

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,631
Latest member
a_potato

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top