Here is the work sheet event . When B column value is changed ,in the same row all formulas are changed automatically. Indirect not required. Hence problem will not be there.
In the initial stage to change all rows formulas. Cut the range say B10:B100. Paste the same in different column. Column B is blank now . Now paste back the data to B column. All rows formulas are now changed.
Code :
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Range("B10:B100"), Target) Is Nothing Then
Dim cel As Range
Dim val
Dim Ro As Long
Application.EnableEvents = False
Application.DisplayAlerts = False
For Each cel In Target
If cel <> "" Then
val = cel.Value
Ro = cel.Row
Cells(Ro, "C").Formula = "=IFERROR('" & val & "'!B5,"""")"
Cells(Ro, "D").Formula = "=IFERROR('" & val & "'!B15,"""")"
Cells(Ro, "E").Formula = "=IFERROR('" & val & "'!B12,"""")"
Cells(Ro, "F").Formula = "=IFERROR('" & val & "'!Z2,"""")"
Cells(Ro, "G").Formula = "=IFERROR('" & val & "'!W1,"""")"
End If
Next cel
Application.EnableEvents = True
Application.DisplayAlerts = True
End If
End Sub
Worksheetevent
To paste the code
Right click on Sheet tab --> view code
Visual Basic (VB) window opens.
Paste the code
Close the VB window.
Save the file
Bookmarks