What "extending IDs" means and why you'd do it
Extending IDs means taking a pattern of numbers or text in one cell and repeating it down a column automatically, rather than typing each one by hand. In Google Sheets, you might have an ID like "EMP001" in one cell and need it to become "EMP002", "EMP003", and so on for fifty rows. Google Sheets can do this for you in seconds.
The most common reason to extend IDs is when you're building a list of records — employees, invoices, products, or customers — and each one needs a unique identifier. Doing this manually takes forever and invites typos. Google Sheets has three main ways to do it, and which one works depends on what your ID looks like.
Key Takeaways
- Google Sheets can automatically continue a number pattern when you select two cells with the pattern and drag down, or use the fill handle to extend the series.
- For IDs with text and numbers together (like "ID001"), you need to set up the first two examples so Sheets understands the pattern before it can extend them.
- The SEQUENCE function creates numbered IDs from scratch without any manual setup, useful when you're starting a list from zero.
- If your ID has a fixed prefix that never changes, a formula combining text and row numbers is faster and more flexible than dragging.
The drag-down method for simple number patterns
If your IDs are just numbers — 1, 2, 3 or 100, 101, 102 — Google Sheets recognizes the pattern from a single cell. Type the first ID in a cell, then grab the small square at the bottom right corner of that cell (called the fill handle) and drag it down as far as you need. Sheets fills in the rest automatically.
This works because Sheets sees a number and assumes you want to count up. If you drag down from the cell containing "1", you get 2, 3, 4, and so on. If you start with "100", you get 101, 102, 103. The direction matters — drag down to go forward, drag up to go backward.
The limitation is that this method only works for pure numbers. If your ID has letters in it, Sheets won't recognize it as a pattern from just one example.
Extending text-and-number IDs by showing the pattern
When your IDs mix letters and numbers — "EMP001", "EMP002", "INV-2024-01" — you need to give Google Sheets two examples so it understands what you're doing. Type the first ID in one cell and the second ID in the cell directly below it. Then select both cells, grab the fill handle at the bottom of the lower cell, and drag down.
For example: put "EMP001" in cell A1 and "EMP002" in cell A2. Select both A1 and A2 together (click A1, hold Shift, click A2). Now grab the small square at the bottom right of A2 and drag down to row 50. Sheets sees the pattern — the text stays the same, the number goes up by one — and fills in "EMP003", "EMP004", all the way down.
This method works for any pattern where the difference between the first and second example is consistent. If you go from "INV-2024-01" to "INV-2024-02", Sheets will continue with "INV-2024-03", "INV-2024-04", and so on. If the pattern is more complex — like "A1B2C3" to "A1B2C4" — Sheets still recognizes that only the last number changed and extends it that way.
Using SEQUENCE to build IDs from scratch
The SEQUENCE function creates a list of numbers automatically without any dragging. This is useful when you're starting a list from zero and want to number it quickly. The basic formula is =SEQUENCE(50), which creates the numbers 1 through 50 in a column.
If you want your IDs to start at a different number, use =SEQUENCE(50, 1, 100) to create 100 through 149. The three parts mean: how many numbers to create, how many columns to spread them across (usually 1), and what number to start with.
To add a text prefix like "EMP" in front of each number, combine SEQUENCE with the CONCATENATE function or the ampersand (&) symbol: ="EMP"&SEQUENCE(50) creates "EMP1", "EMP2", "EMP3", and so on. If you want leading zeros like "EMP001", use ="EMP"&TEXT(SEQUENCE(50),"000").
Building IDs with a formula when the prefix stays the same
If every ID has the same prefix and only the number changes, a formula is often faster and more flexible than dragging. Put this in the first cell: =CONCATENATE("EMP", ROW()-1). The ROW() function returns the row number, so in row 2 it produces "EMP1", in row 3 it produces "EMP2", and so on.
Adjust the formula to match your needs. If you want the IDs to start in row 10 but you want "EMP1" (not "EMP10"), use =CONCATENATE("EMP", ROW()-9). If you want leading zeros, use =CONCATENATE("EMP", TEXT(ROW()-1,"000")) to get "EMP001", "EMP002", and so on.
Once you've entered the formula in the first cell, select that cell and drag the fill handle down to copy the formula to as many rows as you need. The ROW() function automatically adjusts for each row, so you don't have to edit anything.
Fixing mistakes when the pattern doesn't extend the way you wanted
Sometimes Google Sheets doesn't recognize your pattern the way you expected. You drag down and get the same ID repeated instead of incrementing, or it increments by the wrong amount. This usually happens when Sheets can't figure out what changed between your first two examples.
The fix is to be explicit. Select the cells you filled in, then go to the menu and choose Sheet > Fill > Series. A dialog box opens where you can tell Sheets exactly what number to start with, what number to end with, and how much to increase each time. This overrides Sheets' guessing and gives you precise control.
If you used a formula and it's not working, check that your formula is correct by clicking on one of the cells and looking at the formula bar at the top. Make sure ROW() is in there and that your math is right. A common mistake is forgetting to subtract the right number from ROW(), so you end up with IDs that start at the wrong number.
Frequently Asked Questions
Can I extend IDs that have gaps or skip numbers?
Yes, but you need to show Sheets the pattern first. If you want IDs to go 100, 110, 120, put those first two in cells, select both, and drag down. Sheets sees the difference is 10 and continues by 10s. The Fill > Series menu also lets you set a custom increment if dragging doesn't work.
What if I want IDs with a date in them, like INV-2024-01?
Put the first two examples in cells (INV-2024-01 and INV-2024-02), select both, and drag down. Sheets recognizes that only the last number changes and extends it. If the date part needs to change too, you'll need a formula instead, because dragging can't handle that complexity.
How do I extend IDs across multiple columns instead of down one column?
Select your first cell, then drag to the right instead of down. Sheets extends the pattern horizontally. You can also use SEQUENCE with the second parameter set to however many columns you need, like =SEQUENCE(1, 10) to create 10 numbers across one row.
Can I undo extending IDs if I made a mistake?
Yes. Press Ctrl+Z (or Cmd+Z on Mac) immediately after you drag. This undoes the fill. If you've already done other work, you can select the cells you want to clear and press Delete to empty them, then try again.
What's the fastest way to extend IDs for a really long list?
Use SEQUENCE or a formula with ROW(). Both fill an entire column in one step, no dragging required. Type the formula in one cell, select it, then press Ctrl+Shift+End to select all the way to the bottom of your data, and Sheets fills the formula down automatically.