Eu quero substituir um valor na fórmula do Excel em todas as planilhas, mas o valor é incrementado com 1 em cada planilha
Eu experimentei essas macros, mas elas mudam com o mesmo valor
Sub FindReplaceAll()
'PURPOSE: Find & Replace text/values throughout entire workbook
Dim sht As Worksheet
Dim fnd As Variant
Dim rplc As Variant
Dim p As Integer
Dim q As Integer
p = 3
q = p + 1
fnd = "$3"
rplc = "$" & q
For Each sht In ActiveWorkbook.Worksheets
sht.Cells.Replace what:=fnd, Replacement:=rplc, _
LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, _
SearchFormat:=False, ReplaceFormat:=False
Next sht
p=q
End Sub
Tags microsoft-excel vba