I have a table with 3 columns. I want to write a formula that, given a structured reference, returns the index of the column. This will help me write VLookup formulas using the structured reference.
So, for example, for the table MyTable with columns A, B, C I'd like to be able to write: =GetIndex(MyTable[C]) and have it return 3.
Right now I just make sure the table range starts on the sheet's first column and I write =Column(MyTable[C]) but I want something a more robust.
Thanks