Excel and Google Sheets how-to
Freeze rows and columns so the headers stay on screen
Months across the top, names down the side, and once you scroll a little both slide away and you lose track of whose row you are reading. Freezing keeps them on screen while the rest of the sheet moves.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Rep | Jan | Feb | Mar | Apr |
| 2 | Ana Silva | 1240 | 980 | 1105 | 1320 |
| 3 | Ben Okafor | 860 | 1010 | 945 | 1190 |
| 4 | Cara Liu | 1530 | 1475 | 1610 | 1580 |
| 5 | Dev Patel | 720 | 805 | 690 | 910 |
| 6 | Eli Novak | 1180 | 1220 | 1340 | 1295 |
| 7 | Fay Moreau | 990 | 1065 | 1120 | 1040 |
Sample data: monthly sales by rep. In Excel, click B2 and choose View > Freeze Panes > Freeze Panes: row 1 and column A stay on screen as you scroll. In Google Sheets, View > Freeze > 1 row, then View > Freeze > 1 column.
Excel: click the first cell that should scroll
Excel freezes around the cell you click. Microsoft's Freeze Panes page puts the rule in one line: Freeze Panes "freezes the rows above and the columns left of the selected cell."
So to keep row 1 and column A on screen, click B2, the first cell that should move when you scroll. Then choose View > Freeze Panes > Freeze Panes. Scroll down and the months stay at the top; scroll right and the names stay on the left. The same rule covers every other case:
- Row 1 only: click A2.
- Rows 1 to 3: click A4.
- Column A only: click B1.
- Columns A and B: click C1 (Microsoft's own example says select the third column).
- Rows 1 and 2 and columns A and B: click C3.
To undo it, choose View > Freeze Panes > Unfreeze Panes. To freeze a different spot, unfreeze first, click the new cell and freeze again.
Google Sheets: rows and columns are two picks
Google Sheets has no single Freeze Panes. Click any cell, choose View > Freeze and pick the rows: No rows, 1 row, 2 rows or Up to row N. Then open View > Freeze again and pick the columns: No columns, 1 column, 2 columns or Up to column X. Both stay frozen. For the sample above, that is 1 row, then 1 column.
Watch the Up to choices if you know Excel: they count the row and column of the cell you clicked, the opposite of Excel's rule. With B3 selected, Excel would freeze rows 1 and 2 and column A, but the Sheets menu offers Up to row 3 and Up to column B, one more of each. So in Sheets, for headers in rows 1 and 2 and names in column A, click A2 and choose Up to row 2, then Up to column A.
To change it, drag the thick gray line under the frozen rows up or down. To undo it, choose View > Freeze > No rows, then No columns (Google's freeze help page).
From the keyboard: press Alt + / (Option + / on a Mac) to open the Tool finder, type freeze, and pick Freeze 1 row, Freeze up to current row or one of the column choices with the arrow keys, then press Enter.
The freeze option is missing or does not work
No View menu in Google Sheets. The menus are hidden. Press Ctrl + Shift + F, or click the small arrow at the top right of the sheet (its label reads Show the menus) and they come back.
Google Sheets will not freeze. A merged cell crosses the freeze line. With A2:A3 merged, freezing 2 rows gave us a box that says "Sorry, you can't freeze rows which contain only part of a merged cell." Choose Format > Merge cells > Unmerge, or freeze enough rows to take in the whole merged block.
No View tab in Excel. Microsoft's Freeze Panes page says that usually means Excel Starter, which does not have every feature.
A row that is not at the top, like a totals row
Neither app freezes a row from the middle or the bottom of a sheet: Excel freezes the rows above the cell you click, and the Sheets menu counts from row 1 down. Three ways around it.
Show a copy at the top. Say the totals sit in row 50 under a header in row 1. Insert a new row above row 1: the header moves to row 2 and the totals to row 51. In A1, type:
=A51and fill it right to the last column. Row 1 now shows the totals and changes when they change. Then freeze rows 1 and 2: in Excel click A3 and choose View > Freeze Panes > Freeze Panes (click B3 to keep column A too); in Google Sheets choose View > Freeze > 2 rows.
Keep the totals above the header for good. With the header in row 2 and the list from row 3, type this in B1 and fill it right:
=SUM(B3:B500)The empty rows under the list add nothing, and new rows you type there are counted with no change to the formula. Freeze rows 1 and 2 as above.
Split the window in Excel. Split shows two parts of the same sheet at once. Select the row below where the split should go (row 13 splits below row 12), then choose View > Window > Split. Microsoft's Split panes page uses a race list: the top 10 finishers stay in the upper pane while you scroll down to row 180 in the lower one. Choose Split again to take it away.
Sorting with a frozen header (Google Sheets)
In Google Sheets, frozen rows stay out of a whole-sheet sort. Right-click a column letter and choose Sort sheet A to Z: with row 1 frozen, the header stays on top and only the list moves. Unfreeze it first and the header sorts into the list like any other name. Unfreezing itself never changes or moves your data; it only changes what stays on screen.
To sort a list whose header is not frozen, select the cells and use Data > Sort range > Advanced range sorting options, then tick Data has header row.
Headers on every printed page
Freezing only changes the screen. For printing, Google Sheets builds on the freeze: freeze the rows first, then choose File > Print > Headers & footers > Repeat frozen rows (or Repeat frozen columns), as Google's print help page shows.
In Excel it is a separate setting. Choose Page Layout > Print Titles, and on the Sheet tab type $1:$1 in Rows to repeat at top for row 1 ($1:$2 for two rows). Microsoft's print titles page says the command appears dimmed while you are editing a cell, when a chart is selected on the sheet, or when no printer is installed.
On a phone or tablet (Google Sheets app)
On Android, touch and hold a row number or column letter, then tap Freeze (or Unfreeze). On an iPhone or iPad, tap a row number or column letter, tap the right arrow in the menu that appears, then tap Freeze. Both come from the Android and iPhone tabs of Google's freeze help page.
Free practice sheet
Practice on a sales list of 120 reps and 12 months: freeze the header row and the two name columns yourself, then answer questions about reps far down the list without losing track of the columns. A second tab keeps the team totals above the header, frozen with it. Yellow answer cells, a Check column that says Correct or Try again, and an Answers tab. One Excel file that opens in Google Sheets too. Free, no sign up. Sample data.
Download the practice sheet (.xlsx)
Templates with the math already done
Rather skip the formulas? These templates come with every formula built and checked, plus a filled-in sample.
- Sales Tracker and Dashboard 2027Every sale in one workbook, with revenue, top products and top customers on a dashboard.
- Inventory SpreadsheetList your items once, log stock in and out, and see what to reorder.
- Employee Schedule TemplateWeekly shifts for each person with hours, overtime and labour cost.
Teaching this to a class or team?
More how-tos
- Find a price by its code with XLOOKUPType a product code, get its price back from your price list. One formula, no helper columns.
- Total each category with SUMIFSAdd up all the Fuel, all the Office, all the Meals: one formula per category, and more rules when you need them.
- Check two conditions at once with IF and ANDFree shipping only when the order is 50 or more and ships in Canada: one IF, one AND, done.
- Add leading zeros to numbersType 00021 and Excel or Google Sheets shows 21, because to them it is just the number 21. Here is how to get the zeros back, and keep them.
- Fix #DIV/0! in an averageAn average of nothing is a division by zero, so AVERAGE shows #DIV/0! until the first number arrives. One IF fixes it.
- Count rows that meet two conditions with COUNTIFSHow many of Ana's deals were 500 or more? COUNTIFS answers it in one cell, and takes as many rules as you need.
- Calculate percentage changeSales went from 400 to 500. That is a 25% increase, and one short formula works it out for every row.
- Calculate years of service from a start dateAna started on 15 March 2019. How many full years has she worked? DATEDIF counts them, and the same formula works out an age from a date of birth.
- Combine first and last name into one cellFirst names in one column, last names in the next, and you need "Ana Lopez" in one cell. The & sign joins them.
- Find duplicates in a list with COUNTIFA mailing list where some people signed up twice. One formula shows how many times each email appears, so the repeats stand out.
- Split a full name into first and last nameYour list has "Ana Lopez" in one cell and you need Ana and Lopez in two. Two short formulas find the space and split there.
- Total amounts by month with SUMIFSA list of dated expenses and you want one total per month. SUMIFS adds every amount between the first and the last day of the month.
- Count working days between two datesAna is off from 1 Oct to 14 Oct. How many working days is that? NETWORKDAYS counts Monday to Friday and leaves out the weekends.
- Hide #N/A in VLOOKUP with IFERRORYour order list has a code that is not in the price list, and VLOOKUP shows #N/A. IFERROR puts your own words there instead.
- Count cells that contain textA stock list where some items have a note and most do not. One COUNTIF with an asterisk counts the notes and skips the empty cells.
- Make a running total (cumulative sum)Monthly sales in one column, the total so far in the next. One formula, filled down.
- Round to 2 decimal places, up or downA 15% discount turns 12.99 into 11.0415. ROUND makes it 11.04 and keeps your totals right to the cent. ROUNDUP and ROUNDDOWN handle the times when nearest is the wrong answer.
- How long to $1,000,000? FV and NPERPut $500 a month away at an example 7% a year. FV says what it grows to, NPER says when it passes $1,000,000. Two formulas, no calculator site.
- Why your formula gives the wrong number: the order of operationsA2 holds 10 and A3 holds 4. What does =A2-A3*2 give? It is 2, not 12. The same rule explains most formulas that look right and give the wrong number.
- Why your SUM says 0, and how to fix itThe amounts are right there in the column, and the total says 0. They look like numbers, but the sheet has them stored as text, and SUM skips text.
- Fill handle not working? Copy a formula down fastYou wrote one formula and need it in every row. Here are the quick ways to copy it down, and what to check when the fill handle will not show up or the copies come out wrong.
- Calculate hours worked from start and end timesA shift from 9:00 to 17:30 is 8.5 hours, but subtract the times and the cell shows 8:30. One small change turns it into a number you can add up and multiply by a pay rate.
- IF a cell is blank, or not blankYou want a formula to do one thing when a cell is empty and something else when it is filled. Two double quotes do the job, and they also catch the blanks ISBLANK misses.
- Formulas not updating? Recalculate and refreshYou change a number and the total does not move. It is nearly always one of a handful of things, and each one takes seconds to fix once you know which.
- Standard deviation in Excel and Google SheetsTwo shops both average 40 orders a day. One sells 38 to 42 every day; the other swings from 25 to 55. The average cannot tell them apart. The standard deviation can.
- Stack several columns into one column with TOCOLNames in three columns, one for each day, and you need them in one list. One formula does it, and the list keeps up when the columns change.
- Long numbers turn into E+ or end in 0 in ExcelYou type a 12 digit order number and Excel shows 5.93774E+11. You type a 16 digit account number and the last digit turns into 0. The first one is only how the cell looks. The second is a real loss, and it has to be stopped before you type.
- Count how many times each value appears in a columnA staff list with a department on every row, and you need to know how many people are in each department. Two short formulas build the count table, and it keeps up when the list changes.
- Highlight a whole row with a conditional formatting formulaAn order list where you want every late order to stand out, the whole row and not just the Status cell. One rule with a short formula does it, and it keeps working as statuses change.
- Free pricing calculatorsPrice a job from your real costs and margin. No sign up.
- Free downloadsPractice sheets and printable pages, no email and no sign up.







