Hello all,
I am currently working on a sheet that prompts the user to enter yesterday's date in an input box which then stores this entry as a variable (previousDate).
On a tab in this sheet, I have a column for product ID (Column B), report date (Column H) and a tab for Origination date (Column J).
In Column J I have formulas starting in J2 that check another file using a vlookup. Basically it checks to see if the product IDs located in Column B are found in another workbook. If found, it returns the origination date associated with that product ID in Column J. If it is not found, I would like to enter the date that the user entered in the input box, stored in variable previousDate.
In other words,
How would I pass the contents of the variable 'previousDate' into a formula in VBA?=IF(ISNA(VLOOKUP(B2, otherworkbookB:M, 5, 0),previousDate,VLOOKUP(B2,otherworkbookB:M, 5, 0))
Thanks in advance guys, I really appreciate the help!
Bookmarks