Hello all,
Since i am a newbie at vba, i need some help adapting one small portion of my code.
So basically i have the following code that looks on sheet "req" check the date in req!a21, go back to Sheet1, delete everything in column I starting from date in req!a21 and import the numbers from req!b21 to Sheet1 depending on the dates.
Since until this year our file was containing previous years too, everything was working just fine. Now, we start everything from scratch and we didn't include previous years.
In the attached file everything is working fine, but if i change the date in req!A21 to 08.12.2019 (the date of the last request could be from last year, or 2018...etc), the macro returns an error since it cannot find the date from req!a21 on sheet1 column B.
I am trying to change the code a little bit, that if the year in req!A21 is older that this year to do nothing and go to the next macro in queue.
This is my code and please check the demo attached file.
Thank you in advance.Please Login or Register to view this content.
Bookmarks