ItalianPlatinum
Well-known Member
- Joined
- Mar 23, 2017
- Messages
- 793
- Office Version
- 365
- 2019
- Platform
- Windows
Hello - I currently have a date loop that is working as intended, I am unfortunately going to have to modify it to accommodate being given 2 dates then require each date being looped. for example:
10/1/2021
9/28/2021
Would need 9/28, 9/29, 9/30 to loop and no longer will have it conveniently listed for me. is there a way to modify the below to accommodate? currently all the dates are listed so the below works but it will no longer be the case so any help is very much appreciated.
10/1/2021
9/28/2021
Would need 9/28, 9/29, 9/30 to loop and no longer will have it conveniently listed for me. is there a way to modify the below to accommodate? currently all the dates are listed so the below works but it will no longer be the case so any help is very much appreciated.
VBA Code:
Sub RUN_DATE_LOOP()
Dim Dates As Date
Dim i As Long
' Run Dates loop
i = 1
Do Until Sheets("Date Loop").Range("Dates").Offset(i, 0) = ""
Dates = Sheets("Date Loop").Range("Dates").Offset(i, 0)
Sheets("Dist").Range("SP") = Dates
Call SECDIST
i = i + 1
Loop
End Sub