Hello Everyone,
I have attached a sample file of the data that I am working with.
Here is what I'm looking to do:
In column B of the Message tab there is a 9 digit code (JohnJohn1, BillBill1, etc.). I need the macro to look at this code and do a vlookup to Sheet1 to see if it is a "yes" or "no" code. If it is a "yes", then I'll need the macro to then go back to the Message tab and change the dates in column H and I using the "DateChanges" tab.
For example:
In cell B1 of the Message tab you will see "DATID(1,JohnJohn1). I need a vlookup to go and find "JohnJohn1" in Sheet1 and if the value in column D (in this case, since JohnJohn1 is in A1, I'll need it look at D1) is a "yes" then the dates on the Message tab in cells H1 and I1 will need to change. To find out what they need to change to, the macro will need to find those dates in column A of the "DateChanges" tab and then change them to the corresponding date in column B. So for this example, the date that is in H1 and I1 of the Message tab is the same as the date in A1 of the DateChanges tab. Therefore, since JohnJohn1 is a "yes" on Sheet1, both H1 and I1 will need to be updated to the date that is in B1 of the DateChanges tab.
On the other side, if JohnJohn1 was a "no", I would only need the date in I1 to change. H1 could stay the same.
I know it sounds a little crazy but I think the solution is a lot easier than it sounds. I'm just kind of lost on how to go about this. If anyone could help, I'd greatly appreciate it!
Thanks!
TestBook1.xlsx
Bookmarks