Mixed references in Excel, $A1 and A$1: explained with a multiplication table
What a mixed reference is, $A1 vs A$1, the four-press F4 cycle, a multiplication table and a discount matrix — a whole table from one formula.
An absolute reference ($A$1) locks both the column and the row. But when a formula is copied in two directions — down and across — you often need to lock only one of them. That is what a mixed reference does:
$A1— column locked, row shiftsA$1— row locked, column shifts
Once mixed references click, you can fill a table of 25 or 2,500 cells with a single formula. It is the skill that separates confident users from beginners.
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | × | 1 | 2 | 32 | 4 | 5 | |
| 2 | 1 | 1 | 2 | 3 | 4 | 5 | |
| 3 | 2 | 2 | 4 | 6 | 8 | 10 | |
| 4 | 31 | 3 | 6 | 9 | 12 | 15 | |
| 5 | 4 | 4 | 8 | 12 | 16 | 20 | |
| 6 | 5 | 5 | 10 | 15 | 20 | 25 | |
| 7 |
Building a multiplication table with one formula
1
Enter the numbers 1 to 5 in B1:F1 and in A2:A6. These are the two “axes” of the table.
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | × | 1 | 2 | 3 | 4 | 5 | |
| 2 | 1 | ||||||
| 3 | 2 | ||||||
| 4 | 3 | ||||||
| 5 | 4 | ||||||
| 6 | 5 | ||||||
| 7 |
2
Type =A2*B1 in B2. Put the cursor on A2 and press F4 three times — it becomes $A2. Then move to B1 and press F4 twice — B$1. Result: =$A2*B$1.
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | × | 12 | 2 | 3 | 4 | 5 | |
| 2 | 11 | 1 | |||||
| 3 | 2 | ||||||
| 4 | 3 | ||||||
| 5 | 4 | ||||||
| 6 | 5 | ||||||
| 7 |
3
Copy B2 with Ctrl + C, select B2:F6 and press Ctrl + V. (Or drag the fill handle right to F2 first, then down to row 6.)
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | × | 1 | 2 | 3 | 4 | 5 | |
| 2 | 1 | 1 | 2 | 3 | 4 | 5 | |
| 3 | 2 | 2 | 4 | 6 | 8 | 10 | |
| 4 | 3 | 3 | 6 | 9 | 12 | 15 | |
| 5 | 4 | 4 | 8 | 12 | 16 | 20 | |
| 6 | 5 | 5 | 10 | 15 | 20 | 25 | |
| 7 |
4
Check the farthest corner — select F6. The formula is =$A6*F$1, the result 25. If the corner cell is right, the whole table almost always is.
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | × | 1 | 2 | 3 | 4 | 5 | |
| 2 | 1 | 1 | 2 | 3 | 4 | 5 | |
| 3 | 2 | 2 | 4 | 6 | 8 | 10 | |
| 4 | 3 | 3 | 6 | 9 | 12 | 15 | |
| 5 | 4 | 4 | 8 | 12 | 16 | 20 | |
| 6 | 5 | 5 | 10 | 15 | 20 | 254 | |
| 7 |
The F4 cycle: four presses, four states
While a formula is being edited and the cursor is on a reference, each press of F4 moves it to the next state:
A1→$A$1— everything locked$A$1→A$1— only the row lockedA$1→$A1— only the column locked$A1→A1— relative again
Easy to remember: $ locks whatever comes right after it. $A — the column never leaves A; $1 — the row never leaves 1.
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | × | 1 | 2 | 3 | 4 | 5 | |
| 2 | 1 | 1 | 2 | 6 | 24 | 120 | |
| 3 | 2 | 2 | 4 | 24 | 576 | 69120 | |
| 4 | |||||||
| 5 |
A practical example: a discount table
A shop wants to see each product’s price at 5%, 10% and 15% off. Prices are in column A, discounts in row 1. One formula in B2 is enough:
=$A2*(1-B$1)
$A2 always takes the price from column A, B$1 always takes the discount from row 1. Copy it to B2:D5 and you are done. If a 20% column appears tomorrow, you just extend the formula one more column.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Price / Discount | 5% | 10% | 15% | |
| 2 | 120 000 | 114 000 | 108 000 | 102 000 | |
| 3 | 85 000 | 80 750 | 76 500 | 72 250 | |
| 4 | 240 000 | 228 000 | 216 000 | 204 000 | |
| 5 | 56 000 | 53 200 | 50 400 | 47 600 | |
| 6 |
Pro level: “growing” ranges with mixed references
The most useful application of mixed references is a range with a locked start and a moving end:
=СУММ($B$2:B2)— year-to-date total (a running total).=СЧЁТЕСЛИ($A$2:A2;A2)— which occurrence of this customer this is. 1 means first time, 2 or more means a repeat purchase.=ЕСЛИ(СЧЁТЕСЛИ($A$2:A2;A2)=1;"New";"Repeat")— flag duplicates without deleting them.
Another pro move is a two-way report: =СУММЕСЛИМН($C:$C;$A:$A;$E2;$B:$B;F$1). The customer comes from $E2 (moves down), the month from F$1 (moves right) — an entire summary from one formula.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Customer | Occurrence | Status | |
| 2 | Aziz | 1 | New | |
| 3 | Dilnoza | 1 | New | |
| 4 | Aziz | 2 | Repeat | |
| 5 | Javohir | 1 | New | |
| 6 | Aziz | 3 | Repeat | |
| 7 |
Try it in the simulator
Type =$A2*B$1 in B2. Copy B2 and paste it into B2:F6 (or fill right first, then down). If F6 shows 25, everything is correct.
| A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | × | 1 | 2 | 3 | 4 | 5 | ||||||||||||||||||
| 2 | 1 | |||||||||||||||||||||||
| 3 | 2 | |||||||||||||||||||||||
| 4 | 3 | |||||||||||||||||||||||
| 5 | 4 | |||||||||||||||||||||||
| 6 | 5 | |||||||||||||||||||||||
| 7 | ||||||||||||||||||||||||
| 8 | ||||||||||||||||||||||||
| 9 | ||||||||||||||||||||||||
| 10 |
Has ExcelLab been useful?
Support the project and help us release new lessons and exercises.