Prerequisites How the function works The columnLetter function is passed a number of the column and returns the column letter. For example, A is column 1, Z is column 26, AA is column 27 and so on. Cells(1,c) will access the column passed to the function so if 27 is passed the code will become cells(1,27). The .address property will convert cells(1,27) row 1 column 27 to an Address, which becomes $AA$1. The Split VBA function will split the string $AA$1 into an array named a. The array will have a(0) = ""; a(1) = "AA" and a(2) = "1". The value in a(1) is returned which is the column converted from a number to a letter. This routine will fail under a number of circumstances: |