I have an excel report which I am creating Via VBA Macro, with several columns that have calculations on them. The problem is that there are times when my report will have additional or fewer columns. This is causing the fromulas to break since the columns are shifting. So essentially, I never really know where the columns will end up and I don't want to rewrite the formulas every time.

Say I have the following formula

=IF(ISBLANK(Q2),0,IF(Y2=""T"",0,1))

How can I write this to be someting like

=IF(ISBLANK("Wherever header column" = "ABC"),0,IF("Whever column header is "XYZ" =""T"",0,1))