How to Autofill Letters of the Alphabet in Google Sheets


Often you may want to autofill the letters of the alphabet in Google Sheets from A to Z.

Fortunately this is easy to do using the CODE and CHAR functions in Google Sheets and the following example shows how to do so.

Example: How to Autofill Letters of the Alphabet in Google Sheets

To autofill letters of the alphabet, you must first manually type in the first letter you’d like to start with.

For example, we’ll type “A” into cell A1:

Next, we’ll type the following formula into cell A2:

=CHAR(CODE(A1)+1)

This formula will return the letter “B” in cell A2:

Lastly, we can hover over the bottom right corner of cell A2 until a tiny cross (+) appears, then click and drag the formula down to as many cells as we’d like to autofill additional letters of the alphabet:

Google Sheets autofill alphabet

The result is a column of letters ranging from A to Z:

Note: If you start with a lowercase “a” in cell A1 instead, then the formula will autofill all lowercase letters of the alphabet.

How This Formula Works

Recall the formula that we used in cell A2:

=CHAR(CODE(A1)+1)

Here is how this formula works:

First, we use the CODE function to return the ASCII code number associated with the letter in cell A1. This returns 65.

Then we add 1 to get 66.

Then we use the CHAR function to return the character associated with the ASCII code number of 66, which is the letter B.

The formula in the next cell adds 1 again to get 67. Then the CHAR function returns the character associated with the ASCII code number of 67, which is the letter C.

The formula uses this same process to generate each letter of the alphabet.

Note: You can find the complete set of ASCII code numbers here.

Additional Resources

The following tutorials explain how to perform other common tasks in Google Sheets:

How to Fill Series in Google Sheets
How to AutoFill Dates in Google Sheets
How to Autofill Values from Another Sheet in Google Sheets

2 Replies to “How to Autofill Letters of the Alphabet in Google Sheets”

    1. Hi Kara…Yes! You can generate sequences like **AAA, AAB, AAC, …, ZZZ** in **Google Sheets** using a custom Google Apps Script. Here’s how you can create a script to **autofill three-letter combinations** automatically.

      —

      ### **Step-by-Step: Writing the Script**

      1. **Open Google Sheets**.
      2. Click on **Extensions > Apps Script**.
      3. Delete the default code and replace it with the following:

      “`javascript
      function generateAlphabetCombinations() {
      const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
      let row = 1; // Starting row to place the output

      // Loop through all combinations AAA – ZZZ
      for (let i = 65; i <= 90; i++) { for (let j = 65; j <= 90; j++) { for (let k = 65; k <= 90; k++) { let combination = String.fromCharCode(i) + String.fromCharCode(j) + String.fromCharCode(k); sheet.getRange(row, 1).setValue(combination); // Place in column A row++; // Move to the next row } } } } ``` 4. **Save** the project (give it a name, e.g., “AlphabetGenerator”). 5. Close the Apps Script editor. 6. Back in **Google Sheets**, click **Extensions > Apps Script** and run `generateAlphabetCombinations`.

      —

      ### **How the Script Works**
      – The script loops through all **ASCII codes** for capital letters (65 = ‘A’ to 90 = ‘Z’).
      – It generates all combinations from **AAA to ZZZ**.
      – Each combination is placed in **column A**, starting from the first row.

      —

      ### **Output Example:**
      “`
      AAA
      AAB
      AAC
      …
      AAZ
      ABA
      ABB
      …
      ZZZ
      “`

      —

      ### **Optional: Limit or Adjust Output**
      – To limit the range (e.g., stop at AAZ), you can modify the **loop conditions**:
      “`javascript
      for (let i = 65; i <= 65; i++) { // 'A' only for (let j = 65; j <= 90; j++) { for (let k = 65; k <= 90; k++) { ```

Leave a Reply

Your email address will not be published. Required fields are marked *