Hello. I have a spreadsheet that gets added to weekly. the workbook has a table of contents page with hyperlinks to worksheets in book
TOC sheet list worksheet names as hyperlinks starting in cell C7. I have a macro that will follow hyperlink and copy cell B4 from target and paste it on TOC sheet G7. I need help getting the macro to continue down column C and copy target and stop when it gets to first blank cell in column C below is what I have so far It was created by recording the macro.
TOC sheet list worksheet names as hyperlinks starting in cell C7. I have a macro that will follow hyperlink and copy cell B4 from target and paste it on TOC sheet G7. I need help getting the macro to continue down column C and copy target and stop when it gets to first blank cell in column C below is what I have so far It was created by recording the macro.
Code:
Sub Macro5()
'
Range("C7").Select
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
Range("B4").Select
Selection.Copy
Sheets("TOC").Select
Range("G7").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub