Excel VSTACK
Stack ’em up, stack ’em down — combine ranges vertically like a pro.
So What Is VSTACK, Anyway?
Okay, picture this: you’ve got two (or three, or twelve) lists of data. Maybe it’s sales from Q1 in one sheet and Q2 in another. Or names from your morning class and names from your afternoon class. You want to combine them into one big vertical list — like stacking Lego bricks on top of each other. That’s exactly what VSTACK does.
The Syntax (Don’t Run Away)
That’s it. You just list the ranges you want to stack, separated by commas. The first range goes on top, the second goes right under it, and so on. All of them need to have the same number of columns — otherwise Excel will give you a #N/A error where the stacks don’t line up. We’ll talk about that later.
Why Bother With VSTACK?
| Without VSTACK | With VSTACK |
|---|---|
| Copy & paste 3 different lists into one huge column | =VSTACK(list1, list2, list3) — done |
| If one list updates? You manually re-copy everything | It updates automatically. Always. |
| Messy, error-prone, boring | Clean, dynamic, and you look like a wizard |
| Good luck stacking data from different sheets | Just reference the sheets — =VSTACK(Sheet1!A2:A10, Sheet2!A2:A10) |
Easy Dipping Your Toes In
Example 1: Two Simple Lists
You’ve got a list of your favorite fruits and another list of vegetables. You want one big produce list.
Data:
Veggies (B1:B3): Carrot, Broccoli, Spinach
The formula:
Result:
Banana
Cherry
Carrot
Broccoli
Spinach
See? Apple on top, then Banana, then Cherry, then BAM — the veggies start. Six items, one formula.
Example 2: Stacking Columns
Now let’s stack two columns that each have two columns of data. Wait — VSTACK only works if the number of columns matches. So if you stack a 2-column range with a 2-column range, it’s fine. If one has 3 columns and the other has 2, you’ll get errors. Let’s keep it simple first.
Data:
Range2 (C1:D2): 5, 6 | 7, 8
The formula:
Result:
3 4
5 6
7 8
You get a tall block with 4 rows and 2 columns. Nice and neat.
Example 3: Stacking a Single Value with a List
Sometimes you want to add a header or a total row on top of your list. You can stack a single value (like “Total”) with a range.
Data: Your sales numbers are in A1:A3: 100, 200, 300
The formula:
Result:
100
200
300
Boom — header added without breaking a sweat.
Medium Getting Fancy
Example 1: Stacking Data from Different Sheets
Let’s say you have a workbook with three sheets: January, February, March. On each sheet, the sales data is in column A (A2:A10). You want one master list.
The formula (on a summary sheet):
Now you’ve got all the sales from Jan, then Feb, then March stacked vertically. And if you add a new sale in February’s sheet, the master list updates instantly. No more “wait, did I copy that row?”
Example 2: VSTACK with FILTER — Only Stack What Matters
You have two lists of students: one from your morning class (A2:A10) and one from your afternoon class (B2:B10). But you only want to stack the students who scored above 80 on the last test. We’ll use FILTER inside VSTACK.
Data: Morning scores in A2:A10, names in B2:B10. Afternoon scores in C2:C10, names in D2:D10.
The formula:
FILTER(B2:B10, A2:A10>80),
FILTER(D2:D10, C2:C10>80)
)
What’s happening? FILTER gives us only the names where the score is above 80. VSTACK stacks those two filtered lists. So you get a clean list of all your star students from both classes. Dynamic, automatic, and way cooler than copy-paste.
Example 3: Adding a Header Row with VSTACK
You’ve got a table with columns “Name” and “Score” in A2:B10. You want to add a header row that says “Student” and “Grade” at the top.
The formula:
Wait — HSTACK? That’s the horizontal version. We use HSTACK to make a single-row array with two columns, then VSTACK puts that row on top of your data. Boom — instant header.
Hard Stacking Like a Boss
Example 1: Stacking with Mismatched Columns — and Fixing It
Uh-oh. You have List A with 3 columns (Name, Age, City) and List B with 2 columns (Product, Price). If you try to VSTACK them directly, Excel gives you #N/A errors because the column counts don’t match. But you can fix it by adding placeholder columns.
Data: ListA = A1:C3 (3 columns), ListB = D1:E3 (2 columns)
The fix — use HSTACK to add a blank column to ListB:
A1:C3,
HSTACK(D1:E3, SEQUENCE(ROWS(D1:E3), 1, “”))
)
What’s happening? HSTACK takes ListB (2 columns) and adds a third column of empty strings (using SEQUENCE to make a column of blanks). Now both lists have 3 columns, and VSTACK works perfectly. The empty column will just show blanks for ListB’s rows.
Example 2: Dynamic Stacking with SORT — The Ultimate Grade Book
You have three class lists with names and scores. You want to stack them all together, then sort them by score from highest to lowest. And you want it to update automatically when you add new students.
Data: Class1 in A2:B10, Class2 in D2:E10, Class3 in G2:H10. All have columns “Name” and “Score”.
The mega-formula:
stacked, VSTACK(A2:B10, D2:E10, G2:H10),
SORT(stacked, 2, -1)
)
Let’s break it down: LET lets us store the VSTACK result in a variable called “stacked”. Then SORT sorts that stacked array by column 2 (the scores) in descending order (-1). So you get a neatly sorted master list of every student from all three classes, ranked by score. And if you add a new row to Class1, the whole thing updates. This is the kind of formula that makes other teachers ask “how did you do that?”
Example 3: VSTACK + UNIQUE — No Duplicates Allowed
You’ve got two lists of email addresses from two different sign-up sheets. Some people signed up twice. You want one clean list with no duplicates.
Data: List1 in A1:A20, List2 in B1:B20
The formula:
VSTACK piles both lists together, and UNIQUE removes any repeated emails. One formula, one clean deduplicated list. You could even wrap it in SORT to alphabetize it. The possibilities are endless.
💡 PRO TIP
VSTACK + Dynamic Arrays = Superpower
VSTACK is part of Excel’s dynamic array family. That means the result “spills” into the cells below and to the right automatically. You don’t need to use Ctrl+Shift+Enter or guess how many cells to select. Just type the formula in one cell, hit Enter, and Excel fills the rest. If the data changes, the spill range adjusts. It’s like magic, but better.
VSTACK Cheat Sheet
- All arrays must have the same number of columns. If they don’t, you’ll get #N/A. Use HSTACK to pad with blanks if needed.
- It’s dynamic. If your source data changes, the VSTACK result updates. No manual refreshing.
- You can stack more than two things. =VSTACK(A1:A5, B1:B5, C1:C5, D1:D5) works fine.
- Combine with other functions. FILTER, SORT, UNIQUE, CHOOSECOLS — they all work with VSTACK. Nest them like Russian dolls.
- Watch out for blank rows. If your ranges include empty cells, VSTACK stacks them as blanks. If you don’t want blanks, use FILTER to remove them first.
Mistakes We All Make (Including Me)
- Mismatched column counts. You stack a 3-column range with a 2-column range and get a sea of #N/A. Double-check your columns.
- Forgetting that it spills. You type =VSTACK(A1:A5, B1:B5) in cell C1, but there’s already something in C2. Excel throws a #SPILL! error. Clear the cells below.
- Stacking entire columns. =VSTACK(A:A, B:B) — that’s over a million rows. Excel will try, but it might slow down your computer. Use specific ranges.
- Using VSTACK when you should use HSTACK. VSTACK stacks down. HSTACK stacks right. They’re different. Don’t mix them up.
Your Turn — Try These!
Open Excel and give these a shot. Don’t peek at the answers until you’ve tried.
- Easy: Stack the numbers 1 through 5 in A1:A5 with 6 through 10 in C1:C5. Formula in E1.
- Medium: Stack two lists of names (A2:A10 and B2:B10), then sort them alphabetically with SORT.
- Hard: Stack three tables (each with Name and Score columns), sort by score descending, and add a header row that says “Rank” and “Score”. Use LET, VSTACK, SORT, and HSTACK.
If you can do all three, you’re officially a VSTACK master. Go show off to your coworkers. They’ll be impressed.

Leave a Reply
You must be logged in to post a comment.