I have some data structured this way in an Excel spreadsheet:
A B C D E F
1 1 1 2 x 2 3
2 1 1 1 2 2 3
3 3 3 3 3 4 4
I am trying to formulate an Excel formula that will give me the index of the rightmost column in this table, which has a cell corresponding to a specific value.
In this example, the rightmost column containing the value “1” is in column C. For “2,” it will be E. This column index is what I need.
I use column letters to match Excel, but the numeric index of the column is preferred.
I tried some other solutions for similar Excel problems found on the Internet, but they are not quite right.
source
share