Excel Formula Codes: A Practical Function List

Formulas & functions · Updated November 19, 2026

Excel formula codes usually means formulas and the function names inside them: each formula begins with an equals sign, followed by a calculation or function, such as =SUM(B2:B10). This practical list covers common codes for totals, conditions, counting, lookups, rounding, and dates, and explains how to choose, enter, and troubleshoot them.

What “Excel formula codes” means

Excel does not have one official feature called a “formula code list.” People use the phrase to mean one of several related things: function names such as SUM, complete formulas typed into cells, or number-format codes that change how a value appears. Knowing which meaning you need makes it easier to find the right tool.

A formula is an instruction entered in a worksheet cell. It starts with an equals sign, can include cell references and operators, and may call one or more functions. For example, a basic addition formula can add two cells, while a function such as SUM can add a whole range. Function names are not case-sensitive, but spelling, punctuation, parentheses, and argument separators matter.

Number-format codes are different. They affect display, not the underlying calculation. For instance, a number can be displayed as currency or a date without changing the value stored in the cell. The examples below focus mainly on formulas, then cover these display codes separately.

Common Excel formula codes at a glance

These widely used functions handle many routine spreadsheet jobs. The result described for each example assumes the sample data stated directly before the formula.

  • SUM: With values 12, 18, and 20 in B2:B4, enter =SUM(B2:B4) to total them. The result is 50.
  • AVERAGE: With the same values in B2:B4, enter =AVERAGE(B2:B4) to calculate their mean. The result is 16.666…, which displays as 16.67 if the cell is formatted to two decimal places.
  • COUNT: With numeric values in B2:B4, enter =COUNT(B2:B4) to count the cells containing numbers. For the three example values, the result is 3.
  • IF: With a score of 72 in C2 and a pass threshold of 70, enter =IF(C2>=70,"Pass","Review"). The result is Pass.
  • COUNTIF: If A2:A6 contains Paid, Open, Paid, Open, Paid, enter =COUNTIF(A2:A6,"Paid"). The result is 3 because three cells match the criterion.
  • SUMIF: If A2:A4 contains Food, Travel, Food and B2:B4 contains 12, 20, 13, enter =SUMIF(A2:A4,"Food",B2:B4). The result is 25.
  • ROUND: If B2 contains 12.345, enter =ROUND(B2,2) to round to two decimal places. The result is 12.35.
  • IFERROR: If A2 contains 10 and B2 contains 0, enter =IFERROR(A2/B2,"Check denominator"). Because division by zero produces an error, the result is Check denominator.

These examples use commas between function arguments, as in Excel for Microsoft 365 on Windows with standard regional settings. In some regions, Excel uses semicolons instead; if a copied formula gives a syntax error, check the list separator configured for your regional settings.

Choosing the right formula for a task

Start with the result you need, rather than trying to memorize every function. A total calls for SUM; a count of matching records calls for COUNTIF; and a total limited to a category calls for SUMIF. When a result depends on a test, IF can return one value when the test is true and another when it is false.

For example, use COUNT when you want to count numeric cells, COUNTA when you want to count nonblank cells, and COUNTIF when you need to count cells meeting a condition. Those functions do not mean the same thing: COUNT ignores text, while COUNTA counts text and numbers but skips blank cells. A cell containing a formula that returns an empty text string is not necessarily the same as a truly empty cell for every counting purpose.

Lookup formulas are useful when one table holds an identifier and another column holds the related information. For a modern lookup, XLOOKUP can search one range and return a corresponding value from another. If A2:A4 contains P-01, P-02, P-03; B2:B4 contains Pencil, Pen, Folder; and D2 contains P-02, enter =XLOOKUP(D2,A2:A4,B2:B4,"Not found"). The result is Pen. XLOOKUP is available in Microsoft 365 and Excel 2021 or later, but not in older perpetual versions such as Excel 2019.

For older versions, VLOOKUP is a common alternative when the lookup value is in the first column of the table. INDEX and MATCH can also perform flexible lookups, including cases where the return column is to the left of the search column. Check the version used by everyone who must open the workbook before relying on newer functions.

How to enter and copy a formula

Select a cell, type an equals sign and the formula, then press Enter. You can type cell references or select cells with the mouse while building the formula. Excel normally updates the displayed result when its inputs change, provided calculation is set to Automatic.

  1. Choose the cell where the result should appear.
  2. Type the formula, including the leading equals sign and balanced parentheses.
  3. Press Enter and check that the result makes sense for the sample data.
  4. To fill a formula down, drag the fill handle at the lower-right corner of the selected cell, or copy and paste it into the target range.

When a formula is copied, ordinary references such as A2 usually adjust relative to the new location. A dollar sign locks a column, a row, or both. With a tax rate in F1 and a price in B2, enter =B2*$F$1 in C2. If B2 is 100 and F1 is 0.08, the result is 8; copying the formula down changes B2 to B3 while keeping the tax-rate reference fixed. On Windows, F4 while editing a cell reference cycles through reference types. On a Mac, the shortcut can depend on the keyboard and function-key settings; typing the dollar signs directly works across platforms.

For a quick total of adjacent numbers, select the cell below or beside them and choose Home > AutoSum, then confirm the suggested range. On Windows, Alt+= is the AutoSum shortcut. The ribbon command is also available in Excel for Mac and Excel for the web, although interface details and keyboard shortcuts can differ.

Formula codes versus number-format codes

A formula calculates a value; a number format changes how that value looks. To apply a format in Excel for Microsoft 365 on Windows, select the cells, press Ctrl+1 to open Format Cells, and choose Number or Custom. The Home tab’s Number group also provides common formats. On Mac, use Format Cells from the formatting controls or the equivalent keyboard shortcut for your setup.

Examples of custom number-format codes include 0.00 to show two decimal places and #,##0 to show a thousands separator with no decimal places. If a cell contains 0.25, the custom format 0.0% displays it as 25.0%; the underlying value remains 0.25. A date format such as m/d/yyyy changes the display of a date value but does not turn ordinary text into a real date.

Formats can include sections for positive numbers, negative numbers, zero, and text, separated by semicolons. Use care when reading a workbook: a value that looks rounded may retain extra decimal places, and calculations generally use the stored value rather than merely the visible display. If you need the calculation itself rounded, use ROUND in the formula rather than relying only on formatting.

Common formula errors and how to fix them

A formula error is often a clue about the input or reference, not proof that Excel has failed. Check the formula bar, the cell references, and the exact values being used before replacing the formula with a different one.

  • #NAME? Often means Excel does not recognize a function name or text was not put in quotation marks. Check spelling and whether the function is supported by your Excel version.
  • #DIV/0! Means a formula attempted to divide by zero or a blank denominator. Correct the input or decide how the workbook should handle that case.
  • #VALUE! Usually points to an unexpected type of input, such as text where a calculation expects a number. Check for imported numbers stored as text.
  • #N/A: Commonly appears when a lookup cannot find a match. Check for spelling, extra spaces, mismatched data types, and whether the lookup value exists.
  • Formula displayed instead of result: The cell may be formatted as Text, the entry may lack its leading equals sign, or Show Formulas may be enabled. Change the format to General, re-enter the formula, and check the Formulas tab for Show Formulas.
  • Unexpected result after copying: A reference may have shifted. Add dollar signs to the row or column that must stay fixed, or review whether the formula should use an absolute reference.

When a formula appears correct but the answer is stale, check Formulas > Calculation Options. Automatic is the typical setting for recalculating formulas when inputs change; Manual calculation can leave displayed results unchanged until recalculation is triggered.

Finding and learning more functions

Excel includes hundreds of functions, so a short formula list is a starting point rather than a complete catalogue. In Excel for Microsoft 365 on Windows, Formulas > Insert Function opens a search tool that can help locate a function and show its argument structure. Select a function in the formula bar or type its name followed by an opening parenthesis to see argument guidance in many cases.

Function categories are a practical way to explore: logical functions test conditions; text functions clean or combine text; date and time functions work with dates; and lookup and reference functions retrieve related data. For text, CONCAT can join values, while functions such as LEFT or TRIM handle particular extraction or spacing tasks. Availability can vary by Excel version. For instance, TEXTSPLIT, TEXTBEFORE, TEXTAFTER, VSTACK, and HSTACK require Microsoft 365 or Excel 2024; check compatibility before sharing a workbook with users on older releases.

For repeatable work, write down what the inputs represent and test formulas on a small, known example. A formula that returns a plausible answer can still reference the wrong range. Clear headings, consistent data types, and a note about assumptions often make a workbook easier to maintain than adding a more elaborate formula.

Frequently Asked Questions

What is the most common formula in Excel?
SUM is one of the most commonly used functions because it adds values across cells or ranges. The equals sign is what makes the entry a formula; SUM is the function name inside it.

Where can I find a complete Excel formula list?
Use the Insert Function tool from the Formulas tab to search available functions in your installed Excel version. Microsoft’s function documentation also lists functions by category and identifies version availability. A single static list may not match every version.

Why does my Excel formula show as text?
Check whether the cell is formatted as Text, whether the formula starts with an equals sign, and whether Show Formulas is enabled. If the cell was Text-formatted, change it to General and enter the formula again.

Are Excel formulas and function codes the same thing?
No. A formula is the complete expression entered in a cell. A function is a named operation, such as SUM, that can be used inside a formula. Number-format codes are separate instructions for displaying values.

Can I use the same formulas in Excel for Mac?
Most standard worksheet functions are the same on Windows and Mac, but ribbon layouts, shortcuts, and some feature availability can differ. If a formula will be shared, confirm that each user’s Excel version supports its functions.

Why does Excel reject commas in my formula?
Excel uses the argument separator set by regional settings. In some locales that separator is a semicolon rather than a comma. Use the separator Excel expects on that computer when entering or adapting a formula.

Related

Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.

More in Formulas & functions

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.