Sub ChangeToChange() Dim Tablet1 As Workbook Set Tablet1 = Workbooks("Beta.xlsm") Dim Tablet2 As Workbook Set Tablet2 = Workbooks("Gamma.xlsm") Dim OsnTablet As Workbook Set OsnTablet = Workbooks("Alfa.xlsm") Dim i As Integer i = 1 Dim stroka As String OsnTablet.Activate stroka = Cells(2, 1).Value Tablet1.Activate Dim dopstr As String For i = 1 To 200136 If (Cells(i, 2).Value = stroka) Or (Cells(i, 3).Value = stroka) Then If (Cells(i, 2).Value = stroka) Then dopstr = Cells(i, 1).Value Exit For End If If (Cells(i, 3).Value = stroka) Then dopstr = Cells(i, 1).Value Exit For End If End If Next i Tablet2.Activate For i = 1 To 45167 If (Cells(i, 1).Value = dopstr) Then Cells(i, 3).Value = Trim(Workbooks("Alfa").Worksheets("ثوّْ1").Range("E2").Value) Exit For End If Next i End Sub