1. Why is it necessary to run the code twice before it works?
This is due to the logic of the macro. Study this simple code by running it in Step Mode (F8 in the VBA Editor) and preview the contents of the variables after each line is executed. In this mode, run the procedure twice. Compare the differences between the first macro call and the second.
Sheets("List").Range("O2").Formula = "=If(AND(Today() >= List!$L$2, Today() <= List!$M$2), N2, False)"
Today() is a worksheet function. In VBA, the equivalent is Date().
Artik
Bookmarks