Hello everyone,
This is a tricky one, any advice is appreciated here.
I need the user to input a date into my Excel Macro through a popup (InputBox)
Using that input (We'll call it MailerDate) we need to:
For each row...
Compare the input (MailerDate) to the date in column T ('Contract End') [Format: DD/MM/YY)]
If the date is anything up to 1 Month minus 1 day *after* MailerDate, the V column (of that row) needs to be changed to 0.
If the date in column T is 1 month after MailerDate TO 2 months minus 1 day after MailerDate, value of the V needs to be changed to 1.
If the date in column T is 2 months after MailerDate TO 3 months minus 1 day after MailerDate, value of the V needs to be changed to 2.
and so on until..
If the date in column T is 18 months after the MailerDate to 19 months minus 1 day after the MailerDate, value of the V needs to be changed to 18.
It's a complicated one - but it's basically a IF statement (or CASE? Not that familiar with the VBScripting) and a InputBox used to input a date.. With a loop to run this to the last row of the excel file.
Suggestions?
So far all I have is..
Thanks so much!MailerDate = InputBox("Enter the mailing date - Format MM/DD", "Enter Mailing Date", "MM/DD")
Dim r As Range, i As Long
For Each r In Range("V2", Range("V2").End(xlDown))
If
{still researching how to do this exactly..}
End If
Next r
Daniel
Bookmarks