Dark0Prince
Active Member
- Joined
- Feb 17, 2016
- Messages
- 433
Rich (BB code):
Sub FindReplaceAll()
'PURPOSE: Find & Replace text/values throughout entire workbook
'SOURCE: www.TheSpreadsheetGuru.com
Dim sht As Worksheet
Dim fnd As Variant
Dim rplc As Variant
fnd = "17-"
rplc = "18-"
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
Is it possible to change this code to find and replace based on what day it is. So for example if it is Monday it will find and replace for the previous workday which would be find "11-" and replace with "12-". Then if it is Tuesday it will get Mondays number.