ABC2NUM(S) returns the number corresponding to the spreadsheet column represented by the reference string, S. The input string, S, may contain the ascii letters A-Z, in the format commonly employed by spreadsheet programs such as Calc and Microsoft Excel. Other characters, including lower case letters, a-z, are ignored.
NUM2ABC(D) returns the A1-style string label corresponding to the appropriate spreadsheet column represented by the specified integer, D. The specified integer must be greater than or equal to one.
 Abraham, R., Burnett, M. and Erwig, M., "Spreadsheet Programming" Encyclopedia of Computer Science and Engineering, (ed. B.J. Wah), 2804-2810, 2009
Please note: There are many interesting submissions on FEX which provide similar results (see below).
#5942 - xlcolumn
#32843 - Excel column header
#30180 - Calculate Excel range
#28343 - Column Converter for Excel
#27182 - Excel Column Conversion
#15748 - Excel Column Number To Column Name
#12796 - excelcolumn
#6706 - Excel Named Ranges
DS (2021). Convert an A1-style spreadsheet column label to a number. (https://www.mathworks.com/matlabcentral/fileexchange/14008-convert-an-a1-style-spreadsheet-column-label-to-a-number), MATLAB Central File Exchange. Retrieved .
Inspired by: Convert decimal integer to arbitrary base.
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!