Reputation: 37
I want to link cells to another sheet, not just copy cell values The code below is an attempt but tries to show what I need
For Each sheet In ThisWorkbook.Sheets
Cells(Row, col).Formula = sheet.Cells(4, 5).Address
Next
Can someone help me here.
Upvotes: 1
Views: 229
Reputation: 529
You must use sheet name and sign =
like this:
Cells(Row, col).Formula = _
"='" & sheet.Name & "'!" & sheet.Cells(4, 5).Address( _
RowAbsolute:=False, ColumnAbsolute:=False)
Upvotes: 1