Hello all,
I have a macro that will replace all within a workbook, but it won't replace if rows/columns are hidden. How can I make it so it will replace in hidden rows and columns? Thank you in advance
Sub FindReplaceAll()
'PURPOSE: Find & Replace text/values throughout entire workbook
sht As WorksheetDim
fnd As VariantDim
rplc As
Variantfnd = "April"
rplc = "May"
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
End Sub
I have a macro that will replace all within a workbook, but it won't replace if rows/columns are hidden. How can I make it so it will replace in hidden rows and columns? Thank you in advance
Sub FindReplaceAll()
'PURPOSE: Find & Replace text/values throughout entire workbook
sht As WorksheetDim
fnd As VariantDim
rplc As
Variantfnd = "April"
rplc = "May"
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
End Sub