I would like to build the following formula in a VBA macro:
=IF('02 OCT'!D2="""","""",'02 Oct'!D2)"
Basically this formula will look at the contents of cell D2 on the worksheet called 02 Oct. If nothing is there, it returns nothing; if a value is there, it returns the value.
My problem is that in building the formula in VBA the name of the worksheet will change over time as I run the macro. How do I build the formula with a variable that will enter in the name of the worksheet?