Hi Folks
I need an auto run macro that will replace a range of vlookup formulas with their cell values, however the range should be from yesterday's date.
The first column provides the date.
So when I open first time in the morning the macro will run and replace all yesterdays vlookups with their values.
I have the macro below.
Sub Formulatodata()
'updatedbyJim
Dim Rng As Range
Dim WorkRng As Range
On Error Resume Next
xTitleId = "replace formulas with values"
Set WorkRng = Application.Selection
Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8)
Application.ScreenUpdating = False
For Each Rng In WorkRng
Rng.Value = Rng.Text
Next
Application.ScreenUpdating = True
End Sub
This allows me to manually select the range, however I need help with the date part .
sample attached
Bookmarks