AllAboutExcel
New Member
- Joined
- Jun 18, 2018
- Messages
- 2
Hi!
Looking for some assistance with a VBA code. Data will come into the report daily and I want the macro to store the data.
The purpose is that it will select the day previous to yesterday & copy and paste the values. I've got it working - however I've now realised I need to do it for three days previous (to include weekends).
So I want the code to say... 'Find todays date, offset to the row above & select that row plus 2 rows higher.
Here is my current code -
For Each cell In ActiveSheet.Range("A:A")
If cell.Value = [Today()] Then
cell.Offset(-1).EntireRow.Select
End If
Next
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues
Thanks in advance
Looking for some assistance with a VBA code. Data will come into the report daily and I want the macro to store the data.
The purpose is that it will select the day previous to yesterday & copy and paste the values. I've got it working - however I've now realised I need to do it for three days previous (to include weekends).
So I want the code to say... 'Find todays date, offset to the row above & select that row plus 2 rows higher.
Here is my current code -
For Each cell In ActiveSheet.Range("A:A")
If cell.Value = [Today()] Then
cell.Offset(-1).EntireRow.Select
End If
Next
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues
Thanks in advance