Hi,
My table has 4 columns where the 2nd and 3rd column names are dynamic and their value depends on the value of a particular cell. In column 4, I am trying to write a formula through VBA which references Columns 2 and 3 as below (note that currently the name of column 2 is SP500 and Column 3 is Gold).
Since Column 2 (SP500) and Column 3 (Gold) can be dynamic, I want to reference them in a way so that I don't have to go and change the column name in the VBA code every time the column name changes. I understand that the Indirect function cannot be used in VBA. Would be great if someone can suggest a solution for this.
Thanks
Shashank
Bookmarks