Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Dim i As Long, j As Long, present As Boolean, x As Range, s As String
If Sh.Name = "Idem" Then Exit Sub
Application.EnableEvents = False
With Sheets("Idem")
For i = 1 To .UsedRange.Rows.Count
If Application.WorksheetFunction.CountA(.Rows(i)) <> 0 Then
present = False
For j = 1 To .Cells(i, Columns.Count).End(xlToLeft).Column
If .Cells(i, j).HasFormula Then
s = Mid(Replace(Split(.Cells(i, j).Formula, "!")(0), "!", ""), 2)
Set x = Sheets(s).Range(Split(.Cells(i, j).Formula, "!")(1))
If Sheets(s).Name = Sh.Name Then
If Not Intersect(Target, x) Is Nothing Then
present = True
Exit For
End If
End If
End If
Next j
If present Then
For j = 1 To .Cells(i, Columns.Count).End(xlToLeft).Column
If .Cells(i, j).HasFormula Then
s = Mid(Replace(Split(.Cells(i, j).Formula, "!")(0), "!", ""), 2)
Set x = Sheets(s).Range(Split(.Cells(i, j).Formula, "!")(1))
x.Value = Target.Value
End If
Next j
End If
End If
Next i
End With
Application.EnableEvents = True
End Sub