I have a macro to clear data below
I would like the macro amended to include an input box to enter the month and year so that if the dates in col F (format dd/mm/yyyy) are less than a certain month and year then the data must be cleared, otherwise left intact
If input box contains for Eg Oct 2021, then all dates in Col F prior to Oct 2021 to be cleared except row 1, which contains headers
Your assistance in this regard is most appreciated
I would like the macro amended to include an input box to enter the month and year so that if the dates in col F (format dd/mm/yyyy) are less than a certain month and year then the data must be cleared, otherwise left intact
If input box contains for Eg Oct 2021, then all dates in Col F prior to Oct 2021 to be cleared except row 1, which contains headers
Code:
Sub Clear Data ()
Dim LR As Long
With Sheets("Data Import")
.UsedRange.ClearContents
End With
End Sub
Your assistance in this regard is most appreciated