Μετατροπέας Στήλης Λογιστικού Φύλλου
ΝέοΜετατρέψτε τον αριθμό στήλης λογιστικού φύλλου στο γράμμα του (1 → A) και αντίστροφα.
=SUBSTITUTE(ADDRESS(1,27,4),"1","") =COLUMN(AA1) ' number → letter
Split(Cells(1, 27).Address, "$")(1) ' "AA"
' letter → number
Range("AA1").Column ' 27 from openpyxl.utils import get_column_letter, column_index_from_string
get_column_letter(27) # 'AA'
column_index_from_string("AA") # 27 // number → letter
string Col(int n){var s="";while(n>0){n--;s=(char)('A'+n%26)+s;n/=26;}return s;}
Col(27); // "AA" No column matches that search.
Runs entirely in your browser. Nothing is uploaded.
Convert Excel column numbers to letters instantly — and back
This spreadsheet column converter turns an Excel or Google Sheets column number into its letter and the letter back into its number, instantly and in both directions. Type 27 and you get AA; type AA and you get 27. It uses bijective base-26, so even extended columns like 702 (ZZ) and 703 (AAA) convert correctly. Edit either box and the other updates live — no formula to memorise and nothing to install.
It's built for the everyday spreadsheet chores where you need the column index behind a label: writing A1-notation references in code, scripting against the Excel or Google Sheets API, debugging a CSV importer, or just answering 'which column is number 256?' (it's IV) without having to open a spreadsheet to find out.
How spreadsheet column lettering works — bijective base-26
Columns are labelled in bijective base-26: the letters A–Z stand for 1–26, and once you pass Z a second letter appears — AA is 27, AB is 28, AZ is 52, BA is 53, and so on up to ZZ at 702, then AAA at 703. Unlike ordinary base-26 there is no zero digit, because there's no 'zero' column. That single quirk is why 27 becomes AA rather than something like A0.
To read a letter as a number, weight each position by a power of 26: AA = (1 × 26) + 1 = 27, and ABC = (1 × 676) + (2 × 26) + 3 = 731. Naive base-26 conversion code that treats A=0 produces wrong answers for columns above Z — this is the most common source of off-by-one bugs when scripting against spreadsheet APIs.
Formulas, VBA, Python, and C# — code snippets ready to paste
To convert inside a spreadsheet: =SUBSTITUTE(ADDRESS(1,n,4),"1","") returns the column letter for the number n, and =COLUMN(AA1) returns the number for the letter AA. Both work in Excel and Google Sheets. In VBA, Split(Cells(1,n).Address,"$")(1) gives the letter and Range("AA1").Column gives the number.
For Python with openpyxl: get_column_letter(27) returns 'AA' and column_index_from_string('AA') returns 27. For C# without a library, a short loop works — repeatedly compute (n-1) % 26 for each letter and divide by 26. The tool shows each snippet pre-filled with your current value, so you can copy working code straight into a project instead of adapting a generic algorithm.
Bulk convert a whole column list at once
Need to translate dozens of columns? Paste a mixed list of numbers and letters into the Bulk convert box — newline, comma, or space separated — and every token is auto-detected and converted in one pass: numbers become letters, letters become numbers. Switch the output between '27 → AA' pairs, CSV pairs, or result-only, then copy or download as a .csv file.
This is useful when processing API responses from Excel Online or Google Sheets that return column indices, or when working with CSV files that use numeric column references instead of names. No upload required — the whole list is processed locally in your browser, so even sensitive spreadsheet metadata stays on your device.
How this compares to using Excel formulas or looking it up online
Excel itself has no dedicated column-number-to-letter UI. You have to use the ADDRESS/SUBSTITUTE formula workaround or open the VBA editor. Google Sheets is identical. Most search results for this question return Stack Overflow threads with formula snippets — useful, but not a live tool. Tools like RapidTables don't have a column converter at all; the closest thing is usually a general base-conversion calculator that doesn't handle bijective base-26 correctly.
This tool does the conversion instantly in the browser, provides a scrollable reference chart from A (1) to ZZ (702), generates ready-to-paste code for four languages, and handles bulk lists in one pass. It works offline once loaded, needs no sign-in, and stores nothing you type. Bookmark it as a faster alternative to opening a spreadsheet just to look up a column letter.
The R1C1 display mode and when this tool helps
When Excel shows numeric column headers (1, 2, 3…) instead of letters, it's using the R1C1 reference style. Switch it off under File → Options → Formulas → uncheck 'R1C1 reference style'. This sometimes gets enabled accidentally by a macro or by copying a workbook from a colleague who uses it. If you're writing a script that interacts with a workbook in R1C1 mode, you may need to translate between the two reference styles — this converter handles that translation for any column index.
The built-in reference chart at the bottom of the page lists every column from 1 to 702 (A to ZZ) so you can visually scan the range you're working in. For columns beyond ZZ, just type the number or letter in the converter and get the answer in under a second. No need to figure out bijective base-26 arithmetic by hand.
The mathematics of Excel column naming: bijective base-26 in depth
The Excel column system is not plain base-26 — it is bijective base-26, a numeral system where every positive integer maps to exactly one string and there is no zero digit. In standard positional notation, base-26 would require a symbol for zero (making 'A' mean 0 and 'Z' mean 25), but spreadsheet columns start at A = 1. That single absence of a zero shifts every calculation. Z is 26, not a carry-over point, and AA is 27, not 26. ZZ is 702, and AAA is 703 — each new letter prefix multiplies the count by 26 without any skip.
The algorithm to convert a column letter to a number processes each character left to right: n = n × 26 + (letter − 'A' + 1). For AA: start with 0, first letter A gives 0 × 26 + 1 = 1, second letter A gives 1 × 26 + 1 = 27. For XFD: X = 24, F = 6, D = 4 → (24 × 676) + (6 × 26) + 4 = 16,224 + 156 + 4 = 16,384. That is Excel's last column exactly. The reverse — column number to letter — works by repeatedly dividing: compute (n − 1) mod 26 to get the rightmost letter (0 → A, 25 → Z), then set n = floor((n − 1) / 26) and repeat until n reaches zero. The critical subtlety is subtracting 1 before the modulo; without it the Z column (26) produces a remainder of 0 instead of 25, and the algorithm breaks.
This bijective property is mathematically significant: it guarantees a one-to-one correspondence between positive integers and non-empty strings of letters, with no ambiguity and no gaps. The column XFD at 16,384 marks Excel's hard grid limit — 2^14 columns — chosen to fit within a 14-bit index while also landing at a clean bijective-base-26 boundary. Knowing this arithmetic matters when writing converters from scratch: naive base-26 code that simply subtracts 'A' (treating A = 0) produces correct results only for single-letter columns and silently drifts wrong from AA onwards.
Spreadsheet column and row limits across Excel, Google Sheets, and LibreOffice
Modern Excel (.xlsx) supports 16,384 columns (column XFD) and 1,048,576 rows (2^20). A single cell can hold up to 32,767 characters, a sheet name is capped at 31 characters, and the theoretical workbook limit is 1,048,576 sheets — though in practice available RAM is the real ceiling long before that. These limits were introduced with Excel 2007 when the file format moved from the legacy .xls binary to Office Open XML. Before that, Excel 2003 and earlier maxed out at just 256 columns (column IV) and 65,536 rows — a quarter of today's column space. That historical boundary explains why you still occasionally encounter the column label IV in older spreadsheet references, code, and documentation.
Google Sheets uses a different limit: up to 18,278 columns per sheet (reaching the three-letter label ZZZ) and a hard cap of 10 million cells per sheet rather than a separate row limit. In practice a sheet that fills all 18,278 columns would cap at around 547 rows before hitting the cell ceiling. LibreOffice Calc matches Excel exactly — 16,384 columns (XFD) and 1,048,576 rows — making conversions fully portable between the two. When you are writing automation code that must run against multiple platforms, knowing these limits lets you validate column indices before submitting API calls and prevents out-of-range errors that only surface at runtime on large datasets.
The difference between Excel's 16,384-column ceiling and Google Sheets' 18,278-column ceiling is not arbitrary: 16,384 is the largest value that fits in a 14-bit integer, while 18,278 is the number of distinct non-empty letter strings of up to three characters in bijective base-26 (26 + 676 + 17,576 = 18,278). Google Sheets deliberately stops at the natural three-letter boundary of the column alphabet, while Excel stops at a binary-aligned number. XFD happens to fall inside the three-letter space rather than at its edge, which is why Excel's last column is not ZZZ.
VLOOKUP, INDEX/MATCH, and XLOOKUP: how column numbers drive formula reliability
VLOOKUP's third argument, col_index_num, is a hardcoded integer that identifies which column of the lookup table to return. This is where column number awareness becomes critical in practice: if you insert a column in the middle of a lookup table, every VLOOKUP referencing that table returns the wrong data silently, because the column positions shift but the hardcoded numbers do not. The error 'col_index_num is out of range' means the number you provided is larger than the width of the table — knowing that the table runs from column D (4) to column J (10) means col_index_num can be at most 7, not 10. The converter lets you quickly check the column indices of your table boundaries so you can validate VLOOKUP arguments without counting by hand.
INDEX/MATCH eliminates the hardcoded column number entirely. Instead of specifying a fixed offset, MATCH searches for a header label and returns its position dynamically. Inserting a column no longer breaks the formula because MATCH finds the header wherever it moved. The result of MATCH is a column index number — the same kind of number this converter translates — and understanding that relationship helps when debugging INDEX/MATCH formulas that reference the wrong column: you can confirm whether MATCH is returning the index you expect by testing it against the converter's chart.
XLOOKUP (available in Excel 365 and Excel 2021 and later) takes the column-number dependency a step further by accepting a direct range reference as its return argument rather than a numeric offset. You write =XLOOKUP(value, lookup_range, return_range), where return_range is the actual column or columns you want returned — column numbers never appear in the formula at all. XLOOKUP also supports multiple return columns, spilling an array of results, and handles R1C1-style absolute references cleanly in structured tables. For teams still on older Excel versions where XLOOKUP is unavailable, rewriting VLOOKUPs as INDEX/MATCH and using this converter to cross-check column positions is the most reliable migration path.
Programmatic spreadsheet access: openpyxl, pandas, Apps Script, and Power Query
Every major spreadsheet library has its own convention for addressing columns, and none of them agree. openpyxl (Python) uses integer column indices: ws.cell(row=1, column=3) references cell C1 — there is no built-in letter addressing. The utilities module bridges this gap: from openpyxl.utils import get_column_letter, column_index_from_string. get_column_letter(27) returns 'AA' and column_index_from_string('AA') returns 27, using exactly the bijective-base-26 algorithm described above. The implementation subtracts 1 before each modulo step for precisely the reason covered in the mathematics section — omitting that step would produce wrong letters for multiples of 26.
pandas accesses columns by name rather than position: df['Revenue'] retrieves a named column regardless of where it sits in the DataFrame. When position matters, df.iloc[:, 2] returns the third column (zero-indexed). Translating a spreadsheet column letter to a pandas positional index requires subtracting one from the bijective-base-26 number — column C is index 2 (3 − 1), and column AA is index 26 (27 − 1). In Google Sheets Apps Script, the conversion is available as a method on the sheet object: a common helper pattern is sheet.getRange(1, colNumber) where colNumber comes from a bijective-base-26 routine, and some shared script libraries expose columnToLetter() and letterToColumn() functions directly.
Excel Power Query (M language) references columns by name in the query editor UI but by ordinal position in many M functions such as Table.Column(table, "ColumnName") and Table.ToColumns(table){2} (zero-indexed). The Google Sheets QUERY function uses A1-notation column letters inline in SQL-like strings: =QUERY(A:D, "SELECT C WHERE B > 100"). When constructing QUERY strings dynamically in Apps Script, you often need to build the column letter from a loop variable — that is exactly where a bijective-base-26 helper function is needed. The converter on this page produces the letter for any loop index instantly, making it useful as a quick reference while writing dynamic QUERY or Power Query M code.
Frequently asked questions
How do I convert an Excel column number to a letter?
Type the number into the Column number box and the letter appears instantly. The mapping is 1 → A, 2 → B … 26 → Z, then 27 → AA, 28 → AB, and so on. Column 53 is BA, 702 is ZZ, and 703 is AAA. It handles any number up to Excel's maximum column, 16,384 (XFD), and keeps converting correctly beyond that for applications like Google Sheets that allow wider grids.
How do I convert a column letter back to a number in Excel?
Type the letter into the Column letter box and the number appears — AA → 27, AZ → 52, BA → 53, ZZ → 702. Both boxes are linked so you can go either direction: edit the number to get the letter, or edit the letter to get the number. The quickest in-spreadsheet formula is =COLUMN(AA1), which returns 27, but if you just need the answer without opening Excel, paste the letter here and you get it in under a second.
What column number is 27 in Excel?
Column 27 is AA. After Z (column 26) Excel wraps to two letters, so 27 = AA, 28 = AB, continuing to 52 = AZ, then 53 = BA. The pattern follows bijective base-26 arithmetic: each position represents a power of 26, with A=1 rather than A=0 (there is no zero column). This converter shows the letter for any number and includes a reference chart for 1–702 (A–ZZ) you can scroll through or search.
What number is Excel column 'AA'?
Column AA is number 27. You can read it as (1 × 26) + 1 = 27 — the first A contributes 26 and the second contributes 1, because this is bijective base-26 where A=1 rather than A=0. Likewise AB = 28, AZ = 52, and BA = 53. If you need to check a range of letters, use the Bulk convert box and paste them all at once.
How do I switch Excel columns from numbers (R1C1) back to letters?
If your column headers show numbers (1, 2, 3…) instead of letters, Excel is using the R1C1 reference style. Turn it off under File → Options → Formulas → uncheck 'R1C1 reference style', and the headers return to A, B, C. This can also happen when a macro sets Application.ReferenceStyle = xlR1C1. This converter translates the underlying column index either way, regardless of which display style your workbook uses.
What formula converts a column number to a letter in Excel?
Use =SUBSTITUTE(ADDRESS(1,n,4),"1","") and replace n with your column number. ADDRESS(1,27,4) returns the relative reference 'AA1', and SUBSTITUTE strips the '1', leaving 'AA'. To go the other way, =COLUMN(AA1) returns 27. Both formulas work identically in Excel and Google Sheets. If you're writing a VBA macro, Split(Cells(1,n).Address,"$")(1) returns the letter for column n in one line.
How do I convert a column number to a letter in VBA?
One short line handles it: Split(Cells(1, n).Address, "$")(1) returns the column letter for the number n — for n = 27 it returns 'AA'. To convert a letter back to a number, Range("AA1").Column returns 27. Both can be wrapped into a reusable Function. The converter above shows a pre-filled VBA snippet with whatever value you've entered, so you can paste it directly into the Visual Basic Editor.
How do I convert a column number to a letter in Python?
With openpyxl: from openpyxl.utils import get_column_letter, column_index_from_string. get_column_letter(27) returns 'AA' and column_index_from_string('AA') returns 27. Without a library, a short loop works: repeatedly take (n−1) mod 26 to get each letter from right to left, then reverse. The tool shows a ready-made Python snippet pre-filled with your current value so you can copy it straight into a script.
What is the last column in Excel, and what letter is it?
The last column in modern Excel (2007 and later) is column 16,384, which is XFD. Type 16384 in this converter and you get XFD; type XFD and you get 16384. Google Sheets allows columns beyond 18,278 (the ZZZ boundary), and this tool converts correctly for any number you enter, not just Excel's maximum.
How do I convert column numbers to letters in Google Sheets?
Google Sheets uses the same formulas as Excel: =SUBSTITUTE(ADDRESS(1,27,4),"1","") returns 'AA', and =COLUMN(AA1) returns 27. Apps Script uses columnToLetter and letterToColumn helper functions (not built-in, but common in shared scripts). If you just need the answer without opening a spreadsheet, paste the number or letter into this converter — it works in any browser without signing in to Google.
Can I convert a whole list of column numbers to letters at once?
Yes — use the Bulk convert box. Paste a list of numbers and letters separated by newlines, commas, or spaces, and every token is auto-detected and converted in one pass: numbers become letters, letters become numbers. You can switch the output format between 27 → AA pairs, CSV, or result-only, then copy or download as a .csv file. This is practical for processing API responses, spreadsheet metadata, or CSV headers that use numeric indices instead of column names.
Why isn't spreadsheet column numbering just plain base-26?
Plain base-26 would need a zero digit, but spreadsheet columns have no 'zero' letter — A is 1, not 0. That makes the system bijective base-26, where every positive integer maps to exactly one label. It's why Z = 26 (not a wrap to a two-digit number) and 27 = AA (not A0 or B0). The absence of a zero shifts all the arithmetic slightly, which is why naive base-26 conversion code produces wrong results for columns above Z.
Is this converter free, and does it work offline?
Yes to both. There's no sign-up, no cost, and no usage limit. The conversion runs entirely in JavaScript in your browser — nothing you type is uploaded or logged to any server. Once the page has loaded it keeps working offline, so you can convert columns on a plane, behind a corporate firewall, or with no internet connection at all. Bookmark it and it will be there whenever a spreadsheet, API, or script makes you look up a column letter.
How does this compare to Excel's built-in column reference tools?
Excel itself doesn't have a dedicated number-to-letter UI — you have to use the ADDRESS formula workaround or write VBA. Google Sheets is the same. Online alternatives like RapidTables don't have a column converter at all; most searches land on forum posts with formula snippets rather than a live tool. This page converts instantly in the browser, provides the reference chart from A to ZZ, and generates ready-to-paste code for Excel, VBA, Python, and C# — all without requiring any sign-in or app installation.
Related tools
Προβολή όλων των εργαλείωνΜετατροπέας PX σε REM
Μετατρέψτε μεταξύ px, rem, em και pt σε σχέση με ένα μέγεθος γραμματοσειράς root.
Γεννήτρια Srcset
Δημιουργήστε responsive markup <img> με srcset και sizes από τα πλάτη σας.
Δοκιμαστής Regex
Δοκιμάστε κανονικές εκφράσεις με ζωντανή επισήμανση αντιστοιχίσεων, ομάδες σύλληψης και προεπισκόπηση αντικατάστασης.
HTML to Markdown
Convert HTML to clean Markdown — pastes, imports files, and handles lists, tables and code.
JSON Schema Validator
Validate JSON against a JSON Schema (draft-07 / draft-2020-12) with clear error messages.
YAML Formatter
Validate, beautify, and convert YAML online. Real-time syntax highlighting, error detection with line numbers, and one-click JSON export.