Блог им. halssl
Public Sub UpdateRTDFunction() Dim wks As Worksheet Dim rngFormula As Range, cell As Range With [Application] .EnableEvents = False .ScreenUpdating = False End With For Each [wks] In ThisWorkbook.Worksheets On Error Resume Next Set [rngFormula] = [wks].Cells.SpecialCells(xlCellTypeFormulas) On Error GoTo 0 If [rngFormula] Is Nothing Then: Exit Sub For Each [cell] In [rngFormula] If InStr(1, [cell].Formula, "RTD") > 0 Then If InStr(1, [cell].Formula, ", ,") > 0 Then [cell].Formula = Replace([cell].Formula, ", ,", ",""tos.rtd"",", 1) Else [cell].Formula = Replace([cell].Formula, ",,", ",""tos.rtd"",", 1) End If End If Next [cell] [wks].Calculate Next [wks] Set [rngFormula] = Nothing With [Application] .EnableEvents = True .ScreenUpdating = True End With End SubНажимаем Alt+F8, создаем новый макрос, вставляем код, запускаем макрос — профит