So columns in Excel are ordered as such: first they are ordered by length, so that a column with a 2-letter name always comes before a 3-letter column, and then they are alphabetically ordered, so the columns can be enumerated as A, B, C, ..., Z, AA, AB, ..., AZ, BA, ..., ZY, ZZ, AAA, ...;
What we want is, given a column name, determine its position in this list. For that, we are going to count how many columns appear *before* it and add 1. The way we do so is by working from the leftmost letter in the column name to the rightmost one. For the sake of brevity I will take a specific example …