In Excel, a column formula is an expression entered in a cell that calculates a result from values in that column or from other cells. For example, to total numbers in B2 through B10, enter =SUM(B2:B10); to calculate a result separately for each row, put a formula such as =B2*C2 in the first result cell and fill it down.
What “formula for column” can mean
The phrase can refer to several different tasks: adding a column, calculating a value in every row, applying one calculation to an entire column, or creating a formula that uses a column as a range. The right formula depends on the intended result and the shape of the data. Excel does not have one universal “column formula.”
A column is identified by its letter, such as A or B, while a range combines a column and row numbers, such as B2:B10. In a formula, a colon means “through,” so B2:B10 refers to the cells from B2 to B10. A reference such as B:B means the entire B column. Whole-column references can be convenient, but they can also make some calculations slower in very large or complex workbooks.
Common formulas for a column
Choose a function that matches what you want to calculate. These examples assume the values to analyze are in B2:B10:
- Add the values:
=SUM(B2:B10). If the cells contain 2, 3, and 5, the result is 10. - Find the average:
=AVERAGE(B2:B10). For values 2, 3, and 5, the result is 3.33, displayed with two decimal places. - Count numeric cells:
=COUNT(B2:B10). - Count nonblank cells:
=COUNTA(B2:B10). This can count text as well as numbers. - Find the largest or smallest value:
=MAX(B2:B10)or=MIN(B2:B10).
To calculate a row-by-row result, first decide which columns contain the inputs. If quantity is in B and unit price is in C, put =B2*C2 in D2. With B2 equal to 4 and C2 equal to 2.50, the result is 10. Enter the formula in the first data row, then copy it down for the remaining rows.
Fill a formula down a column
In Excel for Microsoft 365 on Windows, enter the formula in the first result cell and press Enter. Select that cell again, then use the fill handle—the small square at its lower-right corner—to drag the formula down. You can also select the formula cell and the cells beneath it, then press Ctrl+D to fill down. On Mac, use Command+D for Fill Down; the fill handle also works.
For a long, continuous data range, double-click the fill handle. Excel usually fills the formula down alongside the neighboring data, stopping when it reaches a blank in that adjacent region. Check the last filled row, especially if the neighboring column has gaps. You can also copy the formula cell, select the destination cells, and paste.
When a relative reference such as B2 is copied from D2 to D3, Excel changes it to B3. This is usually what you want for row calculations. To keep a reference fixed while filling, add dollar signs: =$B$2*C2 always refers to B2 for the first input, while C2 changes by row. Press F4 while editing a reference to cycle through absolute and mixed-reference forms in Windows Excel; on some laptops, you may need Fn+F4.
Use an Excel Table for automatic formulas
If your data has headings, converting it to an Excel Table can make column formulas easier to maintain. Select a cell in the data and choose Insert > Table, confirm the range, and indicate whether the table has headers. You can also use Ctrl+T on Windows or Command+T on Mac. Give each column a clear heading, such as Quantity, Unit Price, and Total.
In a table’s Total column, enter =[@Quantity]*[@[Unit Price]] in the first data row. Excel generally fills the calculated-column formula through the table and applies it to new rows added to the table. The bracketed names refer to table headings, so the formula is easier to interpret than a chain of cell addresses. If a table formula does not fill as expected, check that the cells are part of the table and that the formula was entered in its data area.
Relative, absolute, and whole-column references
References determine which cells a formula uses when it is copied. A relative reference such as B2 adjusts as the formula moves. An absolute reference such as $B$2 stays fixed. Mixed references fix only one part: $B2 keeps the column B fixed while allowing the row to change; B$2 keeps row 2 fixed while allowing the column to change.
Whole-column references can be useful for a growing list. With numbers anywhere in column B, =SUM(B:B) adds the numeric values in the column. However, placing that formula in column B itself creates a circular reference, because the formula tries to include its own cell in the total. Put the result in another column or use a defined range that excludes the result cell. For clearer and more efficient calculations, prefer a specific data range or a Table when practical.
Common problems and checks
- The formula appears as text: The cell may be formatted as Text, or the entry may begin with an apostrophe. Change the format to General, then re-enter the formula.
- The answer does not update: Check Formulas > Calculation Options and select Automatic if appropriate. Press F9 to recalculate in Windows; on Mac, use Fn+F9 on keyboards where the function keys control hardware features.
- You see ####: The column may be too narrow to display the result. Widen it or use a suitable number format.
- You see #VALUE! or #DIV/0!: Check for text where a number is expected, or division by zero. A formula like
=IF(C2=0,
Related
- Excel Column to CSV: Save One Column Correctly
- How to Sort by Column B in Google Sheets
- How to Insert a Column in Excel Using the Keyboard
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- Excel 365 Table Formulas: Structured References ExplainedExcel 365 table formulas are formulas entered in an Excel table that can use readable column names, such…
- Entering an Array Formula in Excel: Steps and ExamplesIn Microsoft Excel for Microsoft 365 on Windows, enter a dynamic array formula in one cell and press…
- Excel IF Formula for Dates: Examples and StepsTo use IF with dates in Excel, test a cell containing a real date and return the label…
- Excel Formula for Date Minus Date: Days BetweenThe core Excel formula for subtracting one date from another is simply =B2-A2, where B2 holds the later…
- Excel Min Date with Criteria: Formula & ExamplesThe fastest way to find the minimum date in Excel that meets a condition is to use the…
- Excel Lookup Second Match: 4 Formulas That WorkTo return the second (or any nth) match in Excel, use the FILTER function (Excel 2021/Microsoft 365): =INDEX(FILTER(range,…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.