ianmiles2012
New Member
- Joined
- Mar 21, 2013
- Messages
- 8
Hello,
I'd like to create VBA code to find yesterday's date and replace it with today's date.
The date is the format YYYYMMDD and is mixed-in with other text in the cell, e.g. ABC YYYYMMDD XYZ
Is there a way to detect YYYYMMDD and replace with YYYYMM(DD+1) ? The replacement date is today's date.
I hope that's clear.
Thanks,
Ian
I'd like to create VBA code to find yesterday's date and replace it with today's date.
The date is the format YYYYMMDD and is mixed-in with other text in the cell, e.g. ABC YYYYMMDD XYZ
Code:
Cells.Replace What:="20130321", Replacement:="20130322", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Is there a way to detect YYYYMMDD and replace with YYYYMM(DD+1) ? The replacement date is today's date.
I hope that's clear.
Thanks,
Ian