Formulas & Functions
Every built-in Excel function with syntax, parameters, practical examples, pro tips, and compatibility info across 9 categories.
Every function, shortcut, hidden trick & VBA snippet in one searchable tool. The only Excel reference you'll ever need.
No more switching between 10 browser tabs. Every formula, shortcut, trick, and VBA snippet — searchable, filterable, and copy-ready.
Every built-in Excel function with syntax, parameters, practical examples, pro tips, and compatibility info across 9 categories.
Complete keyboard shortcuts for Windows and Mac. Toggle between platforms instantly. Covers navigation, editing, formatting, and more.
The non-obvious techniques pros use daily. Data cleaning hacks, formula tricks, formatting secrets, pivot table wizardry, and more.
Ready-to-use VBA macros for common automation tasks. Copy, paste into your module, and run. Each snippet includes a full explanation.
Find any Excel formula, shortcut, or trick in seconds. Zero signup, zero email gate — just instant answers.
Type any keyword into the search bar — a function name like "VLOOKUP", a task like "remove duplicates", or a shortcut like "paste special". Results update instantly across all categories.
Switch between Formulas, Shortcuts, Tricks, and VBA tabs. Use the category filter pills to narrow results — Math, Text, Lookup, Formatting, and more. Toggle Windows/Mac for shortcuts.
Click any card to expand it and see the full description, examples, and pro tips. Hit the Copy button to grab the syntax or code snippet — paste it directly into your spreadsheet or VBA editor.
Our database covers every major Excel function category. Click the Formulas tab above and use the filter pills to explore each one.
Everything you need to know about Excel formulas, shortcuts, and this reference tool.
Microsoft Excel 365 has over 500 built-in worksheet functions across categories like Math & Trigonometry, Statistical, Text, Lookup & Reference, Logical, Date & Time, Financial, Information, Engineering, and more. This tool covers 160+ of the most useful and commonly searched functions, each with full syntax, practical examples, and pro tips.
VLOOKUP and its modern replacement XLOOKUP are the most widely used lookup functions. Other essential formulas include IF (conditional logic), SUMIF/COUNTIF (conditional aggregation), INDEX/MATCH (flexible lookups), CONCATENATE/TEXTJOIN (text combining), and LEFT/RIGHT/MID (text extraction). The best formula depends on your specific task — use the search bar above to find exactly what you need.
XLOOKUP is the modern replacement for VLOOKUP with several key advantages: it can search left (not just right), search from bottom to top, return entire rows or columns, handle exact or approximate matches with a single argument, and has a built-in "if not found" parameter that replaces wrapping VLOOKUP in IFERROR. XLOOKUP requires Excel 365, Excel 2021, or Excel for the web.
The top 10 Excel shortcuts every user should memorize: Ctrl+C (Copy), Ctrl+V (Paste), Ctrl+Z (Undo), Ctrl+S (Save), Ctrl+F (Find), Ctrl+H (Find & Replace), Ctrl+Alt+V (Paste Special — paste values only), F2 (Edit cell), Ctrl+Shift+L (Toggle AutoFilter), and Ctrl+; (Insert today's date). Our Shortcuts tab has 345 shortcuts with both Windows and Mac versions.
Yes, 100% free with no signup, no email gate, no watermarks, and no usage limits. Search, filter, and copy any formula, shortcut, trick, or VBA snippet as many times as you want. Everything runs entirely in your browser — no data is sent to any server, and the tool works offline once loaded.
Many Excel functions work identically in Google Sheets, including SUM, VLOOKUP, IF, COUNTIF, LEFT/RIGHT/MID, and most date functions. Each formula card in this tool includes a "Works In" compatibility line showing whether it's supported in Google Sheets, Excel Web, Excel 2019, Excel 2021, and Excel 365. Some functions like XLOOKUP and dynamic array functions (FILTER, SORT, UNIQUE) are now also available in Google Sheets.
Start by recording macros: go to Developer tab (enable it in File → Options → Customize Ribbon) → Record Macro → perform actions → Stop Recording. Then open the VB Editor (Alt+F11) and study the generated code. Our VBA tab has 39 practical, ready-to-use code snippets organized from beginner to advanced, covering cells, ranges, worksheets, workbooks, data operations, and common automation tasks like sending emails and deleting blank rows.
Dynamic array functions — introduced in Excel 365 — automatically "spill" results into multiple cells from a single formula. Key functions include FILTER (extract rows matching criteria), SORT/SORTBY (sort data by column), UNIQUE (remove duplicates), SEQUENCE (generate number series), RANDARRAY (random numbers), and TOCOL/TOROW (reshape arrays). They eliminate the need for Ctrl+Shift+Enter array formulas and make complex operations much simpler.
LAMBDA lets you create custom, reusable functions without VBA. You define parameters and a formula, name it via the Name Manager, and then use it like any built-in function. For example: =LAMBDA(x, y, x^2 + y^2) creates a function that calculates the sum of squares. Combined with MAP, REDUCE, SCAN, and BYROW, LAMBDA enables functional programming patterns directly in Excel formulas. Available in Excel 365.
Press Ctrl+Alt+V (Windows) or ⌘+Control+V (Mac) to open the Paste Special dialog. Then press V and Enter to paste values only — this removes all formulas, formatting, and links, keeping just the calculated results. You can also paste only Formulas (F), Formats (T), Column Widths (W), or Transpose (E). This is the single most important productivity shortcut for cleaning up spreadsheets.
There are several approaches: (1) Built-in: select your data → Data tab → Remove Duplicates. (2) Conditional Formatting: Home → Conditional Formatting → Highlight Cell Rules → Duplicate Values to visually identify them first. (3) Formula: =COUNTIF($A$1:$A$100, A1)>1 returns TRUE for duplicates. (4) UNIQUE function (Excel 365): =UNIQUE(A1:A100) extracts only unique values into a new range. (5) Advanced Filter with "Unique records only" checkbox. Check our Tricks tab for more techniques.
Yes — once the page has fully loaded, all 1011 items (formulas, shortcuts, tricks, and VBA snippets) are stored in your browser's memory. You can search, filter, and copy without an internet connection. Simply keep the tab open or bookmark this page for quick access anytime.
Math & Trigonometry
=SUM(number1, [number2], ...)
Adds all the numbers in a range of cells.
=SUM(A1:A10) — Adds all values in cells A1 through A10=SUM(A1, B1, C1) — Adds the values in A1, B1, and C1=SUM(A1:A10, C1:C10) — Adds values from two separate rangesPro Tip: SUM ignores text and logical values in ranges, but evaluates them if typed directly as arguments. Use SUMPRODUCT for conditional sums without helper columns.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=SUMIF(range, criteria, [sum_range])
Adds cells that meet a single condition.
=SUMIF(A1:A10, ">100") — Sums values in A1:A10 that are greater than 100=SUMIF(B1:B10, "Apple", C1:C10) — Sums values in C1:C10 where the corresponding B column cell equals Apple=SUMIF(A1:A10, "<>"&D1) — Sums values not equal to the value in D1Pro Tip: If sum_range is omitted, the criteria range is summed. Wildcards * and ? work in text criteria.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=SUMIFS(sum_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)
Adds cells that meet multiple conditions.
=SUMIFS(D1:D10, B1:B10, "Sales", C1:C10, ">1000") — Sums values in D where B is Sales AND C is greater than 1000=SUMIFS(E1:E100, A1:A100, ">=2024-01-01", A1:A100, "<=2024-12-31") — Sums values within a date rangePro Tip: Unlike SUMIF, the sum_range comes FIRST in SUMIFS. All criteria ranges must be the same size as the sum range.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=SUMPRODUCT(array1, [array2], ...)
Multiplies corresponding elements in arrays and returns the sum of those products.
=SUMPRODUCT(A1:A5, B1:B5) — Multiplies each A value by its corresponding B value, then sums the results=SUMPRODUCT((A1:A10="Apple")*(B1:B10)) — Sums B values where A equals Apple (conditional sum without SUMIF)=SUMPRODUCT((A1:A10>0)*(B1:B10>0)) — Counts rows where both A and B are positivePro Tip: SUMPRODUCT is one of the most versatile functions in Excel. It can replicate SUMIFS, COUNTIFS, and weighted averages all in one formula. Before XLOOKUP, it was the go-to for complex lookups.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=ROUND(number, num_digits)
Rounds a number to a specified number of digits.
=ROUND(3.14159, 2) — Returns 3.14=ROUND(1234.5, -2) — Returns 1200 (rounds to nearest hundred)=ROUND(A1, 0) — Rounds A1 to the nearest whole numberPro Tip: Use negative num_digits to round to the left of the decimal (tens, hundreds, etc.). ROUND uses standard rounding (0.5 rounds up).
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=ROUNDUP(number, num_digits)
Rounds a number up, away from zero.
=ROUNDUP(3.141, 2) — Returns 3.15=ROUNDUP(21, -1) — Returns 30=ROUNDUP(-3.1, 0) — Returns -4 (rounds away from zero)Pro Tip: ROUNDUP always rounds away from zero, so negative numbers become more negative. Use CEILING if you want to round up toward positive infinity instead.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=ROUNDDOWN(number, num_digits)
Rounds a number down, toward zero.
=ROUNDDOWN(3.149, 2) — Returns 3.14=ROUNDDOWN(29, -1) — Returns 20Pro Tip: ROUNDDOWN is equivalent to TRUNC for positive numbers. For financial calculations where you must truncate, ROUNDDOWN is preferred over INT because INT always rounds toward negative infinity.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=INT(number)
Rounds a number down to the nearest integer.
=INT(5.7) — Returns 5=INT(-5.7) — Returns -6 (rounds toward negative infinity)=A1-INT(A1) — Extracts only the decimal portion of a numberPro Tip: INT rounds toward negative infinity, not toward zero. For -5.7, INT returns -6 while TRUNC returns -5. Use TRUNC if you want to simply remove decimals.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=MOD(number, divisor)
Returns the remainder after division.
=MOD(10, 3) — Returns 1 (10 divided by 3 leaves remainder 1)=MOD(A1, 2) — Returns 0 if A1 is even, 1 if odd=IF(MOD(ROW(), 2)=0, "Even Row", "Odd Row") — Labels alternating rowsPro Tip: MOD is perfect for alternating patterns (even/odd rows), creating repeating sequences, or checking divisibility. Combine with ROW() for banded formatting logic.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=ABS(number)
Returns the absolute value of a number (removes the sign).
=ABS(-15) — Returns 15=ABS(A1-B1) — Returns the positive difference between A1 and B1Pro Tip: Use ABS to calculate the magnitude of differences regardless of direction, such as variance analysis or distance calculations.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=POWER(number, power)
Returns a number raised to a power.
=POWER(2, 10) — Returns 1024 (2 to the 10th power)=POWER(A1, 1/3) — Returns the cube root of A1Pro Tip: You can also use the caret operator: 2^10 is equivalent to POWER(2,10). Use fractional powers for roots (1/2 for square root, 1/3 for cube root).
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=SQRT(number)
Returns the positive square root of a number.
=SQRT(144) — Returns 12=SQRT(A1^2 + B1^2) — Calculates hypotenuse using Pythagorean theoremPro Tip: SQRT returns #NUM! for negative numbers. Use SQRT(ABS(number)) if the input might be negative, or POWER(number, 1/2) for the same result.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=CEILING(number, significance)
Rounds a number up to the nearest multiple of significance.
=CEILING(2.3, 1) — Returns 3=CEILING(4.52, 0.05) — Returns 4.55 (rounds up to nearest 5 cents)=CEILING(73, 10) — Returns 80 (rounds up to nearest 10)Pro Tip: Use CEILING for pricing (round up to nearest $0.99), time rounding (nearest 15 minutes), or inventory (round up to nearest case quantity).
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=FLOOR(number, significance)
Rounds a number down to the nearest multiple of significance.
=FLOOR(4.7, 1) — Returns 4=FLOOR(73, 10) — Returns 70 (rounds down to nearest 10)=FLOOR(TIME(14,22,0), TIME(0,15,0)) — Rounds a time down to the nearest 15-minute intervalPro Tip: FLOOR is great for time-rounding (billing in 15-minute increments) and binning data into groups (age ranges, price brackets).
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=RAND()
Returns a random decimal number between 0 (inclusive) and 1 (exclusive). Recalculates on every worksheet change.
=RAND() — Returns a random decimal like 0.73625...=RAND()*100 — Returns a random number between 0 and 100=IF(RAND()>0.5, "Heads", "Tails") — Simulates a coin flipPro Tip: RAND recalculates every time the sheet changes. To freeze random values, copy the cells and Paste Special > Values. For reproducible results, consider RANDARRAY in Excel 365.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=RANDBETWEEN(bottom, top)
Returns a random integer between two specified numbers.
=RANDBETWEEN(1, 100) — Returns a random integer from 1 to 100=RANDBETWEEN(1, 6) — Simulates a dice rollPro Tip: Both bottom and top are inclusive. For random dates, use RANDBETWEEN with DATE functions: =RANDBETWEEN(DATE(2024,1,1), DATE(2024,12,31)).
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=AVERAGE(number1, [number2], ...)
Returns the arithmetic mean of its arguments.
=AVERAGE(A1:A10) — Returns the average of values in A1 through A10=AVERAGE(85, 90, 78, 92) — Returns 86.25Pro Tip: AVERAGE ignores empty cells but treats a cell containing 0 as a value. If you need to exclude zeros, use AVERAGEIF(range,"<>0").
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=AVERAGEIF(range, criteria, [average_range])
Returns the average of cells that meet a single condition.
=AVERAGEIF(B1:B10, "Sales", C1:C10) — Averages values in C where B equals Sales=AVERAGEIF(A1:A10, ">0") — Averages only positive values in A1:A10Pro Tip: If average_range is omitted, the criteria range is averaged. Wildcards (* and ?) are supported in text criteria.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=AVERAGEIFS(average_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)
Returns the average of cells that meet multiple conditions.
=AVERAGEIFS(D1:D50, B1:B50, "East", C1:C50, ">1000") — Averages D values where region is East AND amount exceeds 1000Pro Tip: Like SUMIFS, the target range comes first. All criteria ranges must be the same size as the average range.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=MEDIAN(number1, [number2], ...)
Returns the middle number in a sorted set of values.
=MEDIAN(1, 3, 5, 7, 9) — Returns 5 (the middle value)=MEDIAN(A1:A100) — Returns the median of 100 valuesPro Tip: Median is less affected by outliers than AVERAGE. For salary data or house prices, median is usually more representative than mean.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=MODE(number1, [number2], ...)
Returns the most frequently occurring value in a dataset.
=MODE(1, 2, 2, 3, 4) — Returns 2 (appears most often)=MODE(A1:A100) — Returns the most common value in the rangePro Tip: MODE returns only the first mode found. For datasets with multiple modes, use MODE.MULT as an array formula to return all modal values.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=COUNT(value1, [value2], ...)
Counts the number of cells that contain numbers.
=COUNT(A1:A100) — Counts how many cells in A1:A100 contain numbers=COUNT(A1:A10, C1:C10) — Counts numbers across multiple rangesPro Tip: COUNT only counts numbers. Use COUNTA for non-blank cells, COUNTBLANK for empty cells, or COUNTIF for cells matching criteria.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=COUNTA(value1, [value2], ...)
Counts the number of non-empty cells in a range.
=COUNTA(A1:A100) — Counts all non-empty cells (numbers, text, errors, etc.)=COUNTA(A1:Z1) — Counts how many columns have data in row 1Pro Tip: COUNTA counts cells with formulas that return empty strings ("") as non-blank. To avoid this, use SUMPRODUCT((A1:A100<>"")*1).
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=COUNTBLANK(range)
Counts the number of empty cells in a range.
=COUNTBLANK(A1:A100) — Counts empty cells in A1:A100=ROWS(A1:A100)-COUNTBLANK(A1:A100) — Counts non-blank cells (alternative to COUNTA)Pro Tip: COUNTBLANK treats cells with formulas returning "" (empty string) as blank. This differs from COUNTA which counts them as non-blank.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=COUNTIF(range, criteria)
Counts the number of cells that meet a single condition.
=COUNTIF(A1:A100, "Apple") — Counts cells containing exactly Apple=COUNTIF(B1:B100, ">50") — Counts cells with values greater than 50=COUNTIF(A1:A100, "*smith*") — Counts cells containing smith anywhere (case-insensitive)Pro Tip: Use COUNTIF to find duplicates: =COUNTIF(A:A, A1)>1 returns TRUE if A1 is duplicated. Wildcards * (any characters) and ? (single character) work in criteria.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=COUNTIFS(criteria_range1, criteria1, [criteria_range2, criteria2], ...)
Counts cells that meet multiple conditions across ranges.
=COUNTIFS(A1:A100, "Sales", B1:B100, ">1000") — Counts rows where department is Sales AND amount exceeds 1000=COUNTIFS(A1:A100, ">="&DATE(2024,1,1), A1:A100, "<="&DATE(2024,12,31)) — Counts dates within 2024Pro Tip: Use the same range for multiple criteria to create between conditions (e.g., dates between two values, numbers in a range).
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=MAX(number1, [number2], ...)
Returns the largest value in a set of numbers.
=MAX(A1:A100) — Returns the highest value in the range=MAX(A1:A10, B1:B10) — Returns the highest value across both rangesPro Tip: MAX ignores text and logical values in ranges. Use MAXA if you need TRUE=1 and FALSE=0 to be included.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=MAXIFS(max_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)
Returns the maximum value among cells that meet one or more conditions.
=MAXIFS(C1:C100, B1:B100, "Sales") — Returns the highest value in C where B equals Sales=MAXIFS(D1:D50, A1:A50, "East", B1:B50, "Q1") — Finds the max for the East region in Q1Pro Tip: MAXIFS was introduced in Excel 2019/365. For older versions, use MAX(IF(criteria, range)) entered as an array formula with Ctrl+Shift+Enter.
Works in: Excel 365, Excel 2021, Excel 2019, Google SheetsStatistical
=MIN(number1, [number2], ...)
Returns the smallest value in a set of numbers.
=MIN(A1:A100) — Returns the lowest value in the range=MIN(A1, B1, C1) — Returns the smallest of three valuesPro Tip: MIN ignores empty cells and text. To find the smallest positive number, use MIN(IF(A1:A100>0, A1:A100)) as a Ctrl+Shift+Enter array formula.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=MINIFS(min_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)
Returns the minimum value among cells that meet one or more conditions.
=MINIFS(C1:C100, B1:B100, "Sales") — Returns the lowest value in C where B equals SalesPro Tip: Like MAXIFS, this is an Excel 2019+ function. For older versions, use MIN(IF()) entered with Ctrl+Shift+Enter.
Works in: Excel 365, Excel 2021, Excel 2019, Google SheetsStatistical
=LARGE(array, k)
Returns the k-th largest value in a dataset.
=LARGE(A1:A100, 1) — Returns the largest value (same as MAX)=LARGE(A1:A100, 3) — Returns the 3rd largest value=LARGE(A1:A100, ROWS($A$1:A1)) — Used in a column to rank values from largest to smallestPro Tip: Combine LARGE with INDEX/MATCH to return data associated with the top N values. LARGE(range,1) = MAX(range), LARGE(range,2) = second highest, etc.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=SMALL(array, k)
Returns the k-th smallest value in a dataset.
=SMALL(A1:A100, 1) — Returns the smallest value (same as MIN)=SMALL(A1:A100, 5) — Returns the 5th smallest valuePro Tip: Use SMALL with ROWS for a sorted ascending list. Combine with IF for conditional smallest: =SMALL(IF(B:B="Sales",C:C),1) in an array formula.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=RANK(number, ref, [order])
Returns the rank of a number in a list (1 = highest by default).
=RANK(A1, $A$1:$A$50) — Returns A1's rank (1 = highest) among the values=RANK(A1, $A$1:$A$50, 1) — Returns A1's rank with 1 = smallest (ascending)Pro Tip: RANK gives duplicate values the same rank and skips subsequent ranks. For unique ranks with tiebreakers, use RANK(A1,$A:$A)+COUNTIF($A$1:A1,A1)-1.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=STDEV(number1, [number2], ...)
Estimates standard deviation based on a sample (ignores text and logical values).
=STDEV(A1:A100) — Returns the sample standard deviation of the values=STDEV(85, 90, 78, 92, 88) — Returns ~5.22Pro Tip: STDEV is for samples (uses n-1 denominator). Use STDEVP for entire populations (uses n denominator). In most real-world cases, STDEV is correct since you're working with a sample.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=VAR(number1, [number2], ...)
Estimates variance based on a sample.
=VAR(A1:A100) — Returns the sample variance of the valuesPro Tip: Variance is the square of standard deviation. Use VAR.S (sample) or VAR.P (population) for the modern versions of this function.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=FREQUENCY(data_array, bins_array)
Returns a frequency distribution as a vertical array, showing how often values fall within specified ranges.
=FREQUENCY(A1:A50, {10,20,30,40,50}) — Counts values in bins: <=10, 11-20, 21-30, 31-40, 41-50, >50Pro Tip: FREQUENCY returns one more value than the number of bins (the last element counts values above the highest bin). In Excel 365, it spills automatically; in older versions, select the output range and press Ctrl+Shift+Enter.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcText
=LEFT(text, [num_chars])
Extracts a specified number of characters from the start of a text string.
=LEFT("Hello World", 5) — Returns "Hello"=LEFT(A1, 3) — Returns the first 3 characters of A1=LEFT(A1, FIND("-", A1)-1) — Extracts text before the first hyphenPro Tip: If num_chars is omitted, it defaults to 1. Combine with FIND or SEARCH to dynamically extract text before a delimiter.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcText
=RIGHT(text, [num_chars])
Extracts a specified number of characters from the end of a text string.
=RIGHT("Hello World", 5) — Returns "World"=RIGHT(A1, 4) — Returns the last 4 characters of A1Pro Tip: To extract text after the last delimiter, use: =RIGHT(A1, LEN(A1)-FIND("@",SUBSTITUTE(A1,"@","@",LEN(A1)-LEN(SUBSTITUTE(A1,"@",""))))).
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcText
=MID(text, start_num, num_chars)
Extracts characters from the middle of a text string, given a starting position and length.
=MID("Hello World", 7, 5) — Returns "World"=MID(A1, 5, 3) — Extracts 3 characters starting at position 5Pro Tip: Combine with FIND to extract text between delimiters dynamically. MID starts counting at 1 (not 0).
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcText
=LEN(text)
Returns the number of characters in a text string.
=LEN("Hello") — Returns 5=LEN(A1) — Returns the character count of A1=LEN(TRIM(A1)) — Returns character count after removing extra spacesPro Tip: Use LEN to validate data entry (e.g., phone numbers must be 10 digits). Combine with SUBSTITUTE to count occurrences: =LEN(A1)-LEN(SUBSTITUTE(A1,",","")) counts commas.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcText
=FIND(find_text, within_text, [start_num])
Finds the position of a substring within text (case-sensitive).
=FIND("o", "Hello World") — Returns 5 (position of first lowercase o)=FIND("@", A1) — Returns the position of the @ symbol in an email addressPro Tip: FIND is case-sensitive; use SEARCH for case-insensitive matching. FIND returns #VALUE! if the text is not found -- wrap in IFERROR to handle missing matches.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcText
=SEARCH(find_text, within_text, [start_num])
Finds the position of a substring within text (case-insensitive, supports wildcards).
=SEARCH("world", "Hello World") — Returns 7 (case-insensitive)=SEARCH("??-*", A1) — Searches using wildcards (? = single char, * = any chars)Pro Tip: SEARCH supports wildcards (* and ?), while FIND does not. Use SEARCH when you do not care about case or need pattern matching.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcText
=SUBSTITUTE(text, old_text, new_text, [instance_num])
Replaces occurrences of a specified substring with new text.
=SUBSTITUTE("Jan-2024", "-", "/") — Returns "Jan/2024"=SUBSTITUTE(A1, " ", "") — Removes all spaces from A1=SUBSTITUTE("a-b-c-d", "-", "/", 2) — Replaces only the 2nd hyphen: "a-b/c-d"Pro Tip: Use SUBSTITUTE to count character occurrences: =LEN(A1)-LEN(SUBSTITUTE(A1,char,"")). Unlike REPLACE, SUBSTITUTE works with specific text rather than character positions.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcText
=REPLACE(old_text, start_num, num_chars, new_text)
Replaces part of a text string with a different string, based on position.
=REPLACE("2024-01", 5, 1, "/") — Returns "2024/01"=REPLACE(A1, 1, 3, "XXX") — Replaces the first 3 characters with XXXPro Tip: REPLACE works by character position; SUBSTITUTE works by matching text. Use REPLACE when you know the exact position, SUBSTITUTE when you know the text to replace.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcText
=TRIM(text)
Removes extra spaces from text, leaving only single spaces between words.
=TRIM(" Hello World ") — Returns "Hello World"=TRIM(A1) — Cleans up text imported with irregular spacingPro Tip: TRIM only removes ASCII space (char 32). Data from the web often contains non-breaking spaces (char 160). Use SUBSTITUTE(A1,CHAR(160)," ") before TRIM, or =TRIM(CLEAN(SUBSTITUTE(A1,CHAR(160)," "))) for a thorough clean.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcText
=CLEAN(text)
Removes all non-printable characters (ASCII 0-31) from text.
=CLEAN(A1) — Removes non-printable characters from imported data=TRIM(CLEAN(A1)) — Removes non-printable characters and extra spacesPro Tip: CLEAN only removes ASCII control characters (0-31). For Unicode non-printable characters, you may need additional SUBSTITUTE functions.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcText
=LOWER(text)
Converts all characters in a text string to lowercase.
=LOWER("HELLO WORLD") — Returns "hello world"=LOWER(A1) — Converts A1 to lowercasePro Tip: Combine with TRIM for consistent data: =LOWER(TRIM(A1)). Useful for normalizing email addresses and creating case-insensitive comparisons.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcText
=UPPER(text)
Converts all characters in a text string to uppercase.
=UPPER("hello world") — Returns "HELLO WORLD"Pro Tip: Use UPPER for standardizing product codes, state abbreviations, or any field that should be all caps.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcText
=PROPER(text)
Capitalizes the first letter of each word in a text string.
=PROPER("john doe") — Returns "John Doe"=PROPER("UNITED STATES") — Returns "United States"Pro Tip: PROPER capitalizes after every non-letter character, so "o'brien" becomes "O'Brien" (correct) but "McDonald" stays "Mcdonald" (incorrect). Review results for proper nouns.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcText
=CONCATENATE(text1, [text2], ...)
Joins two or more text strings into one string.
=CONCATENATE(A1, " ", B1) — Joins first name and last name with a space=CONCATENATE("ID-", TEXT(A1, "0000")) — Creates IDs like "ID-0042"Pro Tip: CONCATENATE is being replaced by CONCAT and TEXTJOIN in modern Excel. The ampersand (&) operator also concatenates: =A1&" "&B1 is equivalent.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcText
=CONCAT(text1, [text2], ...)
Joins text from multiple ranges and/or strings. Replaces CONCATENATE with range support.
=CONCAT(A1:A5) — Joins all values in A1:A5 without any separator=CONCAT("Hello", " ", "World") — Returns "Hello World"Pro Tip: CONCAT can accept ranges (unlike CONCATENATE) but cannot insert delimiters. For joining with a separator, use TEXTJOIN instead.
Works in: Excel 365, Excel 2021, Excel 2019, Google SheetsText
=TEXTJOIN(delimiter, ignore_empty, text1, [text2], ...)
Joins text from multiple ranges with a delimiter, with an option to ignore empty cells.
=TEXTJOIN(", ", TRUE, A1:A10) — Joins all non-empty values with comma-space separator=TEXTJOIN("-", FALSE, "2024", "01", "15") — Returns "2024-01-15"Pro Tip: TEXTJOIN is the modern way to combine text. Set ignore_empty to TRUE to skip blanks. It accepts ranges, making it far more convenient than CONCATENATE for large datasets.
Works in: Excel 365, Excel 2021, Excel 2019, Google SheetsText
=TEXT(value, format_text)
Converts a number to text with a specified format.
=TEXT(0.25, "0%") — Returns "25%"=TEXT(TODAY(), "MMMM DD, YYYY") — Returns formatted date like "March 17, 2026"=TEXT(1234567.89, "#,##0.00") — Returns "1,234,567.89"=TEXT(42, "0000") — Returns "0042" (zero-padded)Pro Tip: TEXT is essential when combining formatted numbers with text. Without it, dates become serial numbers and percentages become decimals in concatenated strings.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcText
=VALUE(text)
Converts a text string that looks like a number into an actual number.
=VALUE("123.45") — Returns the number 123.45=VALUE("$1,000") — Returns 1000=VALUE(LEFT(A1, 4)) — Extracts the first 4 characters and converts to a numberPro Tip: VALUE is often needed after text manipulation (LEFT, RIGHT, MID) to convert extracted text back to numbers for calculations. In many cases, multiplying by 1 or adding 0 also works.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcLookup & Reference
=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
Searches for a value in the first column of a table and returns a value in the same row from another column.
=VLOOKUP(A1, Sheet2!A:D, 3, FALSE) — Looks up A1 in Sheet2 column A and returns the value from column C (3rd column)=VLOOKUP("Apple", A1:C100, 2, FALSE) — Finds Apple in column A and returns the corresponding value from column BPro Tip: Always use FALSE for the last argument unless you need approximate matching with sorted data. VLOOKUP can only look right -- use INDEX/MATCH or XLOOKUP to look left. Consider switching to XLOOKUP for new formulas.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcLookup & Reference
=HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup])
Searches for a value in the first row of a table and returns a value in the same column from another row.
=HLOOKUP("Q1", A1:D5, 3, FALSE) — Finds Q1 in row 1 and returns the value from row 3Pro Tip: HLOOKUP works like VLOOKUP but horizontally. It is rarely used compared to VLOOKUP. Consider INDEX/MATCH or XLOOKUP for more flexible lookups.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcLookup & Reference
=XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode])
Searches a range or array and returns a matching item. The modern replacement for VLOOKUP, HLOOKUP, and INDEX/MATCH.
=XLOOKUP(E1, A1:A100, C1:C100, "Not Found") — Looks up E1 in column A, returns from column C, shows Not Found if missing=XLOOKUP(E1, A1:A100, B1:D100) — Returns multiple columns at once (spills to B, C, D)=XLOOKUP(MAX(B:B), B:B, A:A) — Finds the name associated with the highest valuePro Tip: XLOOKUP defaults to exact match (unlike VLOOKUP which defaults to approximate). It can look in any direction, return multiple columns, and has a built-in not-found handler. This should be your go-to lookup function.
Works in: Excel 365, Excel 2021, Google SheetsLookup & Reference
=INDEX(array, row_num, [column_num])
Returns the value at a given position in a range or array.
=INDEX(A1:C10, 5, 2) — Returns the value in row 5, column 2 of the range A1:C10=INDEX(A1:A100, MATCH("Apple", B1:B100, 0)) — Classic INDEX/MATCH lookup -- finds Apple in column B and returns the corresponding value from column APro Tip: INDEX/MATCH is more flexible than VLOOKUP: it can look left, is not affected by column insertions, and works with two-way lookups. Pair with MATCH for powerful dynamic lookups.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcLookup & Reference
=MATCH(lookup_value, lookup_array, [match_type])
Returns the relative position of a value in a range.
=MATCH("Apple", A1:A100, 0) — Returns the row number where Apple is found (exact match)=MATCH(MAX(B:B), B:B, 0) — Returns the position of the maximum valuePro Tip: Use match_type 0 for exact match, 1 for largest value less than or equal (sorted ascending), -1 for smallest value greater than or equal (sorted descending). MATCH is most commonly paired with INDEX.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcLookup & Reference
=XMATCH(lookup_value, lookup_array, [match_mode], [search_mode])
Returns the relative position of a value in an array. Modern replacement for MATCH with more features.
=XMATCH("Apple", A1:A100) — Returns the position of Apple (exact match by default)=XMATCH("Ap*", A1:A100, 2) — Returns the position of the first value matching the wildcard patternPro Tip: XMATCH defaults to exact match (unlike MATCH). It supports wildcard matching (mode 2) and binary search (mode 1 or -1) for faster lookups in sorted data.
Works in: Excel 365, Excel 2021, Google SheetsLookup & Reference
=CHOOSE(index_num, value1, [value2], ...)
Returns a value from a list based on an index number.
=CHOOSE(2, "Red", "Blue", "Green") — Returns "Blue" (the 2nd option)=CHOOSE(MONTH(A1), "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec") — Converts month number to abbreviated namePro Tip: CHOOSE can return ranges for use in other functions like SUM or VLOOKUP. This allows dynamic range selection based on a condition.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcLookup & Reference
=INDIRECT(ref_text, [a1])
Converts a text string into a cell reference.
=INDIRECT("A" & B1) — If B1 contains 5, returns the value in cell A5=SUM(INDIRECT("A1:A" & C1)) — Creates a dynamic range for SUM based on the row number in C1=INDIRECT("'" & A1 & "'!B2") — References cell B2 on the sheet named in A1Pro Tip: INDIRECT is powerful for creating references to other sheets dynamically or building data validation lists from named ranges. However, it is volatile (recalculates every time) and can slow down large workbooks.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcLookup & Reference
=OFFSET(reference, rows, cols, [height], [width])
Returns a reference offset from a starting cell by a given number of rows and columns.
=OFFSET(A1, 3, 2) — Returns the value 3 rows down and 2 columns right of A1 (cell C4)=SUM(OFFSET(A1, 0, 0, COUNTA(A:A), 1)) — Sums a dynamic range that grows as data is addedPro Tip: OFFSET is volatile and recalculates every time the sheet changes, which can impact performance. For dynamic ranges in modern Excel, prefer structured tables or the dynamic array functions (FILTER, SORT).
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcLookup & Reference
=ROW([reference])
Returns the row number of a cell reference.
=ROW() — Returns the row number of the current cell=ROW(A5) — Returns 5=ROW()-ROW($A$1)+1 — Creates a sequential counter starting at 1Pro Tip: ROW() with no arguments returns the current row number. Useful for creating sequential numbering that adjusts when rows are inserted or deleted.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcLookup & Reference
=COLUMN([reference])
Returns the column number of a cell reference.
=COLUMN() — Returns the column number of the current cell=COLUMN(D1) — Returns 4Pro Tip: Use COLUMN() to create dynamic column references in INDEX formulas or to auto-number columns in headers.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcLookup & Reference
=TRANSPOSE(array)
Converts a vertical range to horizontal or vice versa (swaps rows and columns).
=TRANSPOSE(A1:A10) — Converts a vertical list to a horizontal row=TRANSPOSE(A1:D3) — Swaps a 4-column by 3-row range into a 3-column by 4-row rangePro Tip: In Excel 365, TRANSPOSE spills automatically. In older versions, select the output range, type the formula, and press Ctrl+Shift+Enter. You can also Paste Special > Transpose for a one-time conversion.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcLogical
=IF(logical_test, value_if_true, [value_if_false])
Returns one value if a condition is TRUE and another if it is FALSE.
=IF(A1>=60, "Pass", "Fail") — Returns "Pass" if A1 is 60 or more, otherwise "Fail"=IF(B1>100, B1*0.1, 0) — Calculates a 10% bonus if B1 exceeds 100, otherwise 0=IF(A1="", "Missing", A1) — Checks for blank cells and displays MissingPro Tip: Avoid deeply nested IFs (more than 3-4 levels). Use IFS, SWITCH, or XLOOKUP for cleaner alternatives. The value_if_false defaults to FALSE if omitted.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcLogical
=IFS(logical_test1, value1, [logical_test2, value2], ...)
Evaluates multiple conditions and returns the value corresponding to the first TRUE condition.
=IFS(A1>=90, "A", A1>=80, "B", A1>=70, "C", A1>=60, "D", TRUE, "F") — Assigns letter grades based on scorePro Tip: Use TRUE as the final condition to create a default/else value. IFS evaluates conditions in order and returns the first match, so put the most specific conditions first.
Works in: Excel 365, Excel 2021, Excel 2019, Google SheetsLogical
=AND(logical1, [logical2], ...)
Returns TRUE if all arguments are TRUE.
=AND(A1>0, A1<100) — Returns TRUE if A1 is between 0 and 100 (exclusive)=IF(AND(B1="Active", C1>1000), "Priority", "Normal") — Checks multiple conditions inside an IFPro Tip: AND is most useful inside IF functions to check multiple conditions simultaneously. It short-circuits internally but all arguments are evaluated.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcLogical
=OR(logical1, [logical2], ...)
Returns TRUE if any argument is TRUE.
=OR(A1="Red", A1="Blue") — Returns TRUE if A1 is either Red or Blue=IF(OR(B1<0, B1>100), "Out of Range", "OK") — Flags values outside 0-100Pro Tip: OR returns TRUE if at least one condition is met. Combine with IF for either/or logic. For checking if a value is one of many options, consider MATCH or XLOOKUP instead of long OR chains.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcLogical
=NOT(logical)
Reverses the logic of its argument: TRUE becomes FALSE and vice versa.
=NOT(A1>10) — Returns TRUE if A1 is 10 or less=NOT(ISBLANK(A1)) — Returns TRUE if A1 is not blankPro Tip: NOT is handy for flipping conditions in FILTER or conditional formatting. Instead of =IF(NOT(A1=""),...), you can often just write =IF(A1<>"",...).
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcLogical
=XOR(logical1, [logical2], ...)
Returns TRUE if an odd number of arguments are TRUE (exclusive OR).
=XOR(A1>5, B1>5) — Returns TRUE if exactly one of the conditions is true, but not bothPro Tip: XOR is useful for toggle logic or validation rules where exactly one of two options should be selected (but not both and not neither).
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcLogical
=IFERROR(value, value_if_error)
Returns the value if no error, otherwise returns the specified fallback value. Catches all error types.
=IFERROR(A1/B1, 0) — Returns the division result, or 0 if B1 is zero (#DIV/0!)=IFERROR(VLOOKUP(A1, Data!A:C, 3, FALSE), "Not Found") — Returns Not Found if the VLOOKUP failsPro Tip: IFERROR catches ALL errors (#N/A, #VALUE!, #REF!, #DIV/0!, #NAME?, #NULL!, #NUM!). If you only want to catch #N/A (common with lookups), use IFNA instead for more precise error handling.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcLogical
=IFNA(value, value_if_na)
Returns the value if it is not #N/A, otherwise returns the specified fallback. Only catches #N/A errors.
=IFNA(XLOOKUP(A1, B:B, C:C), "Not Found") — Returns Not Found only if the lookup returns #N/A=IFNA(MATCH(A1, B:B, 0), 0) — Returns 0 if no match is foundPro Tip: Prefer IFNA over IFERROR for lookups. IFERROR masks all errors, which can hide real problems like #REF! from deleted columns. IFNA only catches the expected #N/A from failed lookups.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcLogical
=SWITCH(expression, value1, result1, [value2, result2], ..., [default])
Evaluates an expression against a list of values and returns the result for the first match.
=SWITCH(A1, 1, "Jan", 2, "Feb", 3, "Mar", "Unknown") — Returns month name for numbers 1-3, or Unknown for anything else=SWITCH(WEEKDAY(TODAY()), 1, "Sun", 2, "Mon", 3, "Tue", 4, "Wed", 5, "Thu", 6, "Fri", 7, "Sat") — Returns the day name for todayPro Tip: SWITCH is cleaner than nested IFs when comparing one expression against multiple exact values. The last argument (with no matching value) serves as the default. For range-based conditions, use IFS instead.
Works in: Excel 365, Excel 2021, Excel 2019, Google SheetsLogical
=LET(name1, value1, [name2, value2], ..., calculation)
Assigns names to calculation results within a formula, improving readability and performance.
=LET(total, SUM(A1:A100), avg, total/COUNT(A1:A100), IF(avg>50, "Above", "Below")) — Calculates total and average once, then uses them in the IF statement=LET(data, FILTER(A1:B100, B1:B100>0), SORT(data, 2, -1)) — Filters data once, then sorts the resultPro Tip: LET improves formula performance by calculating a sub-expression once and reusing it. It also makes complex formulas much more readable. The last argument is always the final calculation.
Works in: Excel 365, Google SheetsLogical
=LAMBDA([parameter1, parameter2, ...], calculation)
Creates custom reusable functions that can be called by name or passed to other functions.
=LAMBDA(x, y, SQRT(x^2 + y^2))(3, 4) — Creates a hypotenuse function and calls it with 3 and 4, returning 5Pro Tip: Name your LAMBDA in the Name Manager to create a custom function you can call like =HYPOTENUSE(3,4). LAMBDA functions can also be passed to MAP, REDUCE, and SCAN for powerful array operations.
Works in: Excel 365, Google SheetsLogical
=TRUE()
Returns the logical value TRUE.
=TRUE() — Returns TRUE=IF(A1=TRUE(), "Yes", "No") — Checks if A1 contains the boolean TRUEPro Tip: You can usually type TRUE directly without the function. TRUE() is mainly useful in contexts requiring a function rather than a constant.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcLogical
=FALSE()
Returns the logical value FALSE.
=FALSE() — Returns FALSEPro Tip: Like TRUE(), you can usually type FALSE directly. These functions exist mainly for compatibility and programmatic use.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcDate & Time
=TODAY()
Returns the current date (updates each time the worksheet recalculates).
=TODAY() — Returns today's date=TODAY()-A1 — Calculates the number of days since the date in A1=IF(A1<TODAY(), "Overdue", "On Time") — Checks if a date has passedPro Tip: TODAY() is volatile and updates on every recalculation. For a static date that does not change, press Ctrl+; (semicolon) to insert today's date as a value.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcDate & Time
=NOW()
Returns the current date and time (updates each time the worksheet recalculates).
=NOW() — Returns the current date and time=NOW()-A1 — Calculates the elapsed time since a datetime in A1=INT(NOW()) — Returns just today's date (strips the time portion)Pro Tip: NOW() includes the time component. Use TODAY() if you only need the date. For a static timestamp, press Ctrl+; for date or Ctrl+Shift+; for time.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcDate & Time
=DATE(year, month, day)
Creates a date from individual year, month, and day components.
=DATE(2024, 12, 25) — Returns December 25, 2024=DATE(YEAR(A1), MONTH(A1)+1, 0) — Returns the last day of A1's month=DATE(2024, 1, 1) + 90 — Returns the date 90 days after January 1, 2024Pro Tip: DATE handles overflow gracefully: DATE(2024,13,1) returns January 1, 2025. This makes month and date arithmetic easy without worrying about boundaries.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcDate & Time
=DATEVALUE(date_text)
Converts a date stored as text into an Excel date serial number.
=DATEVALUE("2024-03-15") — Converts the text string to a date value=DATEVALUE("March 15, 2024") — Recognizes various date text formatsPro Tip: DATEVALUE is useful when dates imported from external sources are stored as text. The recognized date formats depend on your system's regional settings.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcDate & Time
=DAY(serial_number)
Returns the day of the month from a date (1-31).
=DAY(TODAY()) — Returns today's day number=DAY("2024-03-15") — Returns 15Pro Tip: Combine DAY, MONTH, and YEAR to decompose dates for custom formatting or calculations. DAY(DATE(year,month+1,0)) gives the last day of any month.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcDate & Time
=MONTH(serial_number)
Returns the month from a date (1-12).
=MONTH(TODAY()) — Returns the current month number=MONTH("2024-03-15") — Returns 3Pro Tip: Use TEXT(A1,"MMMM") for the full month name or TEXT(A1,"MMM") for the abbreviation instead of a CHOOSE/SWITCH with MONTH.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcDate & Time
=YEAR(serial_number)
Returns the year from a date.
=YEAR(TODAY()) — Returns the current year=YEAR(A1)-YEAR(B1) — Calculates the approximate difference in years between two datesPro Tip: For accurate age or year difference calculations, use DATEDIF instead of subtracting YEAR values, since YEAR subtraction does not account for month and day.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcDate & Time
=HOUR(serial_number)
Returns the hour component from a time value (0-23).
=HOUR(NOW()) — Returns the current hour=HOUR("14:30:00") — Returns 14Pro Tip: Excel stores times as decimal fractions of a day. 0.5 = 12:00 PM. Use HOUR, MINUTE, SECOND to extract components from time values.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcDate & Time
=MINUTE(serial_number)
Returns the minute component from a time value (0-59).
=MINUTE(NOW()) — Returns the current minute=MINUTE("14:30:45") — Returns 30Pro Tip: To round a time to the nearest 15 minutes, use MROUND or FLOOR/CEILING with TIME(0,15,0) as the significance.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcDate & Time
=SECOND(serial_number)
Returns the second component from a time value (0-59).
=SECOND("14:30:45") — Returns 45Pro Tip: For sub-second precision, Excel times are limited to about 3 decimal places of precision (milliseconds). For higher precision, store values as numbers rather than times.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcDate & Time
=EDATE(start_date, months)
Returns a date that is a specified number of months before or after a start date.
=EDATE(A1, 3) — Returns the date 3 months after A1=EDATE(TODAY(), -6) — Returns the date 6 months agoPro Tip: EDATE handles month-end dates intelligently: EDATE(Jan 31, 1) returns Feb 28/29. Use negative months to go backward. Essential for loan schedules and contract dates.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcDate & Time
=EOMONTH(start_date, months)
Returns the last day of the month, a specified number of months before or after a date.
=EOMONTH(TODAY(), 0) — Returns the last day of the current month=EOMONTH(A1, 1) — Returns the last day of the month after A1's date=EOMONTH(A1, 0)+1 — Returns the first day of the next monthPro Tip: EOMONTH(date,0) gives the last day of the date's month. EOMONTH(date,-1)+1 gives the first day of the date's month. These are extremely useful for monthly reporting.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcDate & Time
=NETWORKDAYS(start_date, end_date, [holidays])
Returns the number of working days (excluding weekends and optional holidays) between two dates.
=NETWORKDAYS(A1, B1) — Counts working days between two dates (Mon-Fri)=NETWORKDAYS(A1, B1, Holidays!A:A) — Excludes holidays listed in a rangePro Tip: NETWORKDAYS counts both the start and end dates. For custom weekends (e.g., Friday-Saturday), use NETWORKDAYS.INTL and specify the weekend pattern.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcDate & Time
=WORKDAY(start_date, days, [holidays])
Returns a date that is a specified number of working days before or after a start date.
=WORKDAY(TODAY(), 10) — Returns the date 10 working days from today=WORKDAY(A1, -5) — Returns the date 5 working days before A1Pro Tip: Use WORKDAY for calculating delivery dates, SLA deadlines, or project milestones. For custom weekends, use WORKDAY.INTL.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcDate & Time
=DATEDIF(start_date, end_date, unit)
Calculates the difference between two dates in years, months, or days. A hidden function not in the function wizard.
=DATEDIF(A1, TODAY(), "Y") — Returns the number of complete years between A1 and today (age calculator)=DATEDIF(A1, B1, "M") — Returns the number of complete months between two dates=DATEDIF(A1, B1, "D") — Returns the number of days between two datesPro Tip: DATEDIF is undocumented in modern Excel but still works. Units: Y (years), M (months), D (days), YM (months ignoring years), MD (days ignoring months/years), YD (days ignoring years). It is the best way to calculate age.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcDate & Time
=WEEKDAY(serial_number, [return_type])
Returns the day of the week as a number.
=WEEKDAY(TODAY()) — Returns 1 (Sunday) through 7 (Saturday) by default=WEEKDAY(A1, 2) — Returns 1 (Monday) through 7 (Sunday)Pro Tip: The return_type argument changes which day is 1: use 1 for Sunday=1, 2 for Monday=1, 3 for Monday=0. Combine with CHOOSE or SWITCH for day names.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcDate & Time
=WEEKNUM(serial_number, [return_type])
Returns the week number of a date within the year.
=WEEKNUM(TODAY()) — Returns the current week number=WEEKNUM(A1, 21) — Returns the ISO 8601 week numberPro Tip: Use return_type 21 for ISO 8601 week numbering (used in Europe and most international contexts). Alternatively, use ISOWEEKNUM for the same result.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcFinancial
=PMT(rate, nper, pv, [fv], [type])
Calculates the periodic payment for a loan or investment based on constant payments and a constant interest rate.
=PMT(5%/12, 360, -250000) — Monthly payment on a $250,000 mortgage at 5% for 30 years: ~$1,342=PMT(0.06/12, 48, -20000, 0) — Monthly payment on a $20,000 car loan at 6% for 4 yearsPro Tip: The rate must match the payment period (monthly rate for monthly payments = annual rate / 12). PV is typically negative (money you borrow). PMT returns a negative number for payments you make.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcFinancial
=FV(rate, nper, pmt, [pv], [type])
Calculates the future value of an investment based on periodic, constant payments and a constant interest rate.
=FV(7%/12, 240, -500) — Future value of investing $500/month for 20 years at 7% annual return=FV(0.05, 10, 0, -10000) — Future value of a $10,000 lump sum after 10 years at 5%Pro Tip: Use negative values for cash outflows (payments you make). Set pmt to 0 for lump-sum investments. The result shows what your investment will be worth at the end.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcFinancial
=PV(rate, nper, pmt, [fv], [type])
Calculates the present value of a series of future payments or a lump sum.
=PV(8%/12, 120, -500) — How much a $500/month annuity for 10 years is worth today at 8%=PV(0.06, 5, 0, -100000) — Present value of receiving $100,000 in 5 years at 6% discount ratePro Tip: PV answers: how much is a future income stream worth today? It is the core function behind discounted cash flow (DCF) analysis and bond pricing.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcFinancial
=NPV(rate, value1, [value2], ...)
Calculates the net present value of an investment based on a discount rate and a series of future cash flows.
=NPV(10%, B1:B5) + A1 — NPV of cash flows in B1:B5 with initial investment in A1 (at time 0)=NPV(0.08, -50000, 15000, 20000, 25000, 30000) — NPV of a project with uneven cash flows at 8% discount ratePro Tip: NPV assumes cash flows occur at the END of each period, starting from period 1. If you have an initial investment at time 0, add it separately: =NPV(rate, future_flows) + initial_investment.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcFinancial
=IRR(values, [guess])
Calculates the internal rate of return for a series of cash flows.
=IRR(A1:A6) — Returns the IRR where A1 is the initial investment (negative) and A2:A6 are returns=IRR({-100000, 30000, 35000, 40000, 45000}) — IRR of a project with an initial $100K investmentPro Tip: The values must contain at least one negative and one positive number. If IRR does not converge, try providing a guess close to the expected rate. For irregular cash flow dates, use XIRR.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcFinancial
=RATE(nper, pmt, pv, [fv], [type], [guess])
Calculates the interest rate per period for a loan or investment.
=RATE(48, -500, 20000)*12 — Annual interest rate on a loan of $20,000 with $500/month payments over 4 years=RATE(120, -200, 0, 50000)*12 — Annual return needed to reach $50K by investing $200/month for 10 yearsPro Tip: RATE returns the per-period rate. Multiply by 12 for the annual rate on monthly loans. Provide a guess (default 10%) if the function does not converge.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcFinancial
=NPER(rate, pmt, pv, [fv], [type])
Calculates the number of payment periods for a loan or investment.
=NPER(5%/12, -1000, 200000) — Number of months to pay off a $200,000 loan at 5% with $1,000/month payments=NPER(0.07/12, -500, 0, 100000) — Months needed to reach $100K by investing $500/month at 7%Pro Tip: Divide the result by 12 to convert monthly periods to years. NPER helps answer questions like: how long until my loan is paid off? or how long until I reach my savings goal?
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcFinancial
=SLN(cost, salvage, life)
Calculates the straight-line depreciation of an asset for one period.
=SLN(50000, 5000, 10) — Annual depreciation of a $50,000 asset with $5,000 salvage value over 10 years: $4,500/yearPro Tip: SLN is the simplest depreciation method: (cost - salvage) / life. For accelerated depreciation, use DDB (double declining balance) or SYD (sum of years digits).
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcFinancial
=EFFECT(nominal_rate, npery)
Converts a nominal annual interest rate to an effective annual rate, given the number of compounding periods per year.
=EFFECT(0.06, 12) — Effective annual rate for 6% compounded monthly: ~6.17%=EFFECT(0.05, 4) — Effective rate for 5% compounded quarterly: ~5.09%Pro Tip: Use EFFECT to compare loans or investments with different compounding frequencies. A 6% rate compounded monthly is actually higher than 6% compounded annually.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcFinancial
=NOMINAL(effect_rate, npery)
Converts an effective annual interest rate to a nominal rate, given the number of compounding periods per year.
=NOMINAL(0.0617, 12) — Nominal rate for an effective 6.17% compounded monthly: ~6.00%Pro Tip: NOMINAL is the inverse of EFFECT. Use it when you know the effective rate (APY) and need to find the stated/nominal rate (APR).
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcInformation
=ISBLANK(value)
Returns TRUE if the cell is empty.
=ISBLANK(A1) — Returns TRUE if A1 is empty=IF(ISBLANK(A1), "No data", A1) — Displays No data for blank cellsPro Tip: ISBLANK returns FALSE for cells containing formulas that return empty strings (""). To check for both blank and empty strings, use A1="" instead.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcInformation
=ISERROR(value)
Returns TRUE if the value is any error (#N/A, #VALUE!, #REF!, #DIV/0!, #NAME?, #NULL!, #NUM!).
=ISERROR(A1/B1) — Returns TRUE if the division results in any error=IF(ISERROR(VLOOKUP(A1, Data!A:B, 2, FALSE)), "", VLOOKUP(A1, Data!A:B, 2, FALSE)) — Suppresses errors from VLOOKUP (use IFERROR instead for cleaner syntax)Pro Tip: In modern Excel, use IFERROR instead of IF(ISERROR(),...). IFERROR is more concise and only evaluates the formula once. Use ISERROR mainly in conditional formatting rules.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcInformation
=ISNUMBER(value)
Returns TRUE if the value is a number.
=ISNUMBER(A1) — Returns TRUE if A1 contains a number=ISNUMBER(SEARCH("apple", A1)) — Returns TRUE if A1 contains the word apple (case-insensitive)Pro Tip: ISNUMBER combined with SEARCH is a classic pattern for case-insensitive text containment checks: =ISNUMBER(SEARCH("text",A1)). Works great in conditional formatting.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcInformation
=ISTEXT(value)
Returns TRUE if the value is text.
=ISTEXT(A1) — Returns TRUE if A1 contains text=SUMPRODUCT(ISTEXT(A1:A100)*1) — Counts how many cells contain textPro Tip: ISTEXT returns TRUE for cells containing text, including numbers stored as text (which can cause calculation issues). Use it to identify problematic data.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcInformation
=TYPE(value)
Returns a number indicating the data type of a value (1=number, 2=text, 4=logical, 16=error, 64=array).
=TYPE(A1) — Returns 1 if A1 is a number, 2 if text, etc.=TYPE(TRUE) — Returns 4 (logical)Pro Tip: TYPE is useful for debugging formulas and understanding what type of data a cell actually contains, especially with imported data that may have unexpected types.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcInformation
=CELL(info_type, [reference])
Returns information about the formatting, location, or contents of a cell.
=CELL("address", A1) — Returns "$A$1"=CELL("filename", A1) — Returns the full file path and sheet name=CELL("format", A1) — Returns a code representing the cell's number formatPro Tip: Common info_type values: address, col, row, filename, format, width, type, protect. CELL("filename") is a classic way to get the current workbook path in a formula.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcInformation
=ISFORMULA(reference)
Returns TRUE if the referenced cell contains a formula.
=ISFORMULA(A1) — Returns TRUE if A1 contains a formula, FALSE if it contains a value or is emptyPro Tip: ISFORMULA is useful for auditing spreadsheets to find which cells contain formulas vs. hardcoded values. Combine with conditional formatting to highlight all formula cells.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcInformation
=ISNA(value)
Returns TRUE if the value is the #N/A error.
=ISNA(VLOOKUP(A1, B:C, 2, FALSE)) — Returns TRUE if the VLOOKUP did not find a matchPro Tip: Use IFNA instead of IF(ISNA(),...) for cleaner syntax. ISNA is best used in conditional formatting or when you specifically need to detect only #N/A errors and not other error types.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcDynamic Array
=FILTER(array, include, [if_empty])
Filters an array based on a Boolean array (criteria) and returns the matching rows/columns.
=FILTER(A1:D100, B1:B100="Sales") — Returns all rows where column B is Sales=FILTER(A1:D100, (B1:B100="Sales")*(C1:C100>1000), "No results") — Filters with multiple conditions (AND logic using *)=FILTER(A1:D100, (B1:B100="Sales")+(B1:B100="Marketing"), "No results") — Filters with OR logic using +Pro Tip: Use * for AND conditions and + for OR conditions between Boolean arrays. Always include an if_empty value to avoid #CALC! errors when no rows match. FILTER replaces many complex INDEX/MATCH patterns.
Works in: Excel 365, Excel 2021, Google SheetsDynamic Array
=SORT(array, [sort_index], [sort_order], [by_col])
Sorts the contents of a range or array in ascending or descending order.
=SORT(A1:C10) — Sorts by the first column ascending=SORT(A1:C10, 3, -1) — Sorts by the 3rd column descending=SORT(UNIQUE(A1:A100)) — Returns a sorted list of unique valuesPro Tip: SORT returns a dynamic spill array that updates automatically. Nest FILTER inside SORT to filter and sort in one formula. Use sort_order 1 for ascending, -1 for descending.
Works in: Excel 365, Excel 2021, Google SheetsDynamic Array
=SORTBY(array, by_array1, [sort_order1], [by_array2, sort_order2], ...)
Sorts an array based on the values in one or more corresponding arrays.
=SORTBY(A1:C10, C1:C10, -1) — Sorts the table by column C descending=SORTBY(A1:C10, B1:B10, 1, C1:C10, -1) — Sorts by column B ascending, then column C descendingPro Tip: SORTBY is more flexible than SORT because you can sort by columns not in the output array, and easily do multi-level sorts. It is the formula equivalent of clicking multiple sort levels in the Sort dialog.
Works in: Excel 365, Excel 2021, Google SheetsDynamic Array
=UNIQUE(array, [by_col], [exactly_once])
Returns unique values from a range or array.
=UNIQUE(A1:A100) — Returns a list of distinct values from column A=UNIQUE(A1:C100) — Returns unique rows based on all columns=UNIQUE(A1:A100, FALSE, TRUE) — Returns values that appear exactly once (no duplicates)Pro Tip: Set exactly_once to TRUE to return values that appear only once (not just distinct values). Combine with SORT for a sorted unique list: =SORT(UNIQUE(A1:A100)).
Works in: Excel 365, Excel 2021, Google SheetsDynamic Array
=SEQUENCE(rows, [columns], [start], [step])
Generates a sequence of numbers in an array.
=SEQUENCE(10) — Returns numbers 1 through 10 in a column=SEQUENCE(5, 3) — Returns a 5-row by 3-column array of sequential numbers=SEQUENCE(12, 1, DATE(2024,1,1), 31) — Generates approximate first-of-month dates for 2024=SEQUENCE(10, 1, 0, 0.1) — Returns 0.0, 0.1, 0.2, ..., 0.9Pro Tip: SEQUENCE replaces helper columns of sequential numbers. Use it with INDEX for dynamic row references, or as a dates sequence for timelines. Start and step can be decimals or dates.
Works in: Excel 365, Excel 2021, Google SheetsDynamic Array
=RANDARRAY([rows], [columns], [min], [max], [whole_number])
Returns an array of random numbers with specified dimensions and range.
=RANDARRAY(5, 3) — Returns a 5x3 array of random decimals between 0 and 1=RANDARRAY(10, 1, 1, 100, TRUE) — Returns 10 random integers between 1 and 100=RANDARRAY(5, 5, 1, 6, TRUE) — Simulates rolling 25 dice (5x5 grid)Pro Tip: Set whole_number to TRUE for integers. RANDARRAY is volatile and recalculates on every change. For reproducible random data, generate once and paste as values.
Works in: Excel 365, Excel 2021, Google SheetsDynamic Array
=TOCOL(array, [ignore], [scan_by_column])
Converts a 2D array into a single column.
=TOCOL(A1:D5) — Reshapes a 4-column by 5-row range into a single column of 20 values=TOCOL(A1:D5, 1) — Converts to column, ignoring blank cells=TOCOL(A1:C3, 0, TRUE) — Scans by column instead of by rowPro Tip: Use ignore parameter: 0 = keep all, 1 = ignore blanks, 2 = ignore errors, 3 = ignore blanks and errors. TOCOL is the inverse of WRAPROWS/WRAPCOLS.
Works in: Excel 365, Google SheetsDynamic Array
=TOROW(array, [ignore], [scan_by_column])
Converts a 2D array into a single row.
=TOROW(A1:B5) — Reshapes a 2-column by 5-row range into a single row of 10 values=TOROW(A1:C3, 1) — Converts to a row, ignoring blanksPro Tip: TOROW and TOCOL are extremely useful for combining with TEXTJOIN to create comma-separated lists from 2D ranges, or for feeding reshaped data into other array functions.
Works in: Excel 365, Google SheetsMath & Trigonometry
=AGGREGATE(function_num, options, ref1, [ref2], ...)
Performs one of 19 aggregate calculations (SUM, AVERAGE, COUNT, etc.) with options to ignore errors, hidden rows, or nested functions.
=AGGREGATE(4, 6, A1:A100) — MAX (function 4) ignoring error values (option 6)=AGGREGATE(14, 6, A1:A100, 3) — LARGE (function 14), 3rd largest, ignoring errors=AGGREGATE(9, 5, A1:A100) — SUM (function 9) ignoring hidden rows (useful with filtered data)Pro Tip: AGGREGATE is the Swiss Army knife of calculation functions. It can replicate SUM, AVERAGE, COUNT, MIN, MAX, LARGE, SMALL, and more while ignoring errors or hidden rows. Option 5 ignores hidden rows, option 6 ignores errors.
Works in: Excel 365, Excel 2021, Excel 2019, LibreOffice CalcMath & Trigonometry
=SUBTOTAL(function_num, ref1, [ref2], ...)
Performs a specified calculation (SUM, AVERAGE, COUNT, etc.) and can ignore manually hidden rows.
=SUBTOTAL(9, A1:A100) — SUM of A1:A100, ignoring other SUBTOTAL results in the range=SUBTOTAL(109, A1:A100) — SUM ignoring manually hidden rows (100-series)=SUBTOTAL(3, A1:A100) — COUNTA equivalent, ignoring other subtotalsPro Tip: Function numbers 1-11 ignore rows hidden by filter but include manually hidden rows. Add 100 (101-111) to also ignore manually hidden rows. SUBTOTAL ignores other SUBTOTAL values in the range, preventing double-counting.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=PERCENTILE(array, k)
Returns the k-th percentile of values in a range (k is between 0 and 1).
=PERCENTILE(A1:A100, 0.9) — Returns the 90th percentile value=PERCENTILE(A1:A100, 0.5) — Returns the 50th percentile (same as MEDIAN)Pro Tip: Use PERCENTILE for performance thresholds (e.g., 95th percentile response time). PERCENTILE(range, 0.25) and PERCENTILE(range, 0.75) give you the interquartile range boundaries.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=MROUND(number, multiple)
Rounds a number to the nearest specified multiple.
=MROUND(7, 5) — Returns 5 (rounds to nearest 5)=MROUND(1.3, 0.5) — Returns 1.5 (rounds to nearest 0.5)=MROUND(TIME(14,22,0), TIME(0,15,0)) — Rounds a time to the nearest 15 minutesPro Tip: MROUND rounds to the nearest multiple (up or down). Use CEILING for always up, FLOOR for always down. It is perfect for pricing to the nearest $0.50 or time to the nearest quarter hour.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=TRUNC(number, [num_digits])
Truncates a number to a specified number of decimal places without rounding.
=TRUNC(4.9) — Returns 4 (removes decimal, no rounding)=TRUNC(-4.9) — Returns -4 (truncates toward zero, unlike INT which returns -5)=TRUNC(3.14159, 2) — Returns 3.14Pro Tip: TRUNC simply chops off digits without rounding. For positive numbers, TRUNC and INT give the same result. For negative numbers, TRUNC rounds toward zero while INT rounds toward negative infinity.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcLookup & Reference
=ADDRESS(row_num, column_num, [abs_num], [a1], [sheet_text])
Creates a cell address as text, given row and column numbers.
=ADDRESS(1, 3) — Returns "$C$1" (absolute reference)=ADDRESS(1, 3, 4) — Returns "C1" (relative reference)=ADDRESS(5, 2, 1, TRUE, "Sheet2") — Returns "Sheet2!$B$5"Pro Tip: ADDRESS creates text, not an actual reference. Wrap it in INDIRECT to use it as a reference: =INDIRECT(ADDRESS(row,col)). The abs_num parameter controls mixed/absolute references.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcLookup & Reference
=ROWS(array)
Returns the number of rows in a reference or array.
=ROWS(A1:A10) — Returns 10=ROWS(Table1) — Returns the number of data rows in Table1Pro Tip: ROWS is useful in formulas that need to know the size of a dynamic range. Combine with SEQUENCE or INDEX for dynamic range calculations.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcLookup & Reference
=COLUMNS(array)
Returns the number of columns in a reference or array.
=COLUMNS(A1:D1) — Returns 4=COLUMNS(Table1) — Returns the number of columns in Table1Pro Tip: Use COLUMNS to make formulas adapt automatically to table width changes, especially in summary formulas that span entire tables.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcLookup & Reference
=FORMULATEXT(reference)
Returns the formula in a cell as a text string.
=FORMULATEXT(A1) — Returns the formula text from A1 (e.g., "=SUM(B1:B10)")Pro Tip: FORMULATEXT is excellent for documentation, training sheets, or auditing. It returns #N/A if the referenced cell does not contain a formula.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcText
=EXACT(text1, text2)
Checks whether two text strings are exactly the same (case-sensitive).
=EXACT("Apple", "apple") — Returns FALSE (different case)=EXACT("Apple", "Apple") — Returns TRUE=EXACT(A1, B1) — Compares two cells with case sensitivityPro Tip: Normal Excel comparisons (A1=B1) are case-insensitive. Use EXACT when case matters, such as validating passwords, product codes, or case-sensitive IDs.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcText
=CHAR(number)
Returns the character specified by a code number (ASCII/ANSI).
=CHAR(65) — Returns "A"=CHAR(10) — Returns a line break character (useful in CONCATENATE)=A1 & CHAR(10) & B1 — Joins two cells with a line break between themPro Tip: CHAR(10) is a line break -- essential for multi-line cell content in formulas. CHAR(9) is a tab. Combine with CODE to encode/decode characters.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcText
=CODE(text)
Returns the numeric code for the first character in a text string.
=CODE("A") — Returns 65=CODE(A1) — Returns the ASCII code of the first character in A1Pro Tip: CODE is the inverse of CHAR. Use it to identify hidden/special characters in imported data or to create custom sorting logic based on character codes.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcText
=REPT(text, number_times)
Repeats text a given number of times.
=REPT("*", 5) — Returns "*****"=REPT("=-", 20) — Creates a text divider line=REPT("|", A1/10) — Creates a simple in-cell bar chartPro Tip: REPT is great for creating simple in-cell bar charts (sparklines made of text characters), padding strings, or generating visual indicators based on values.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcText
=NUMBERVALUE(text, [decimal_separator], [group_separator])
Converts text to a number, with control over decimal and thousands separators.
=NUMBERVALUE("1.234,56", ",", ".") — Converts European-formatted number (1.234,56) to 1234.56=NUMBERVALUE("25%") — Returns 0.25Pro Tip: NUMBERVALUE is essential when working with international data where decimal and thousands separators differ from your system settings. It handles %, which VALUE does not.
Works in: Excel 365, Excel 2021, Excel 2019, Google SheetsDate & Time
=TIME(hour, minute, second)
Creates a time value from individual hour, minute, and second components.
=TIME(14, 30, 0) — Returns 2:30 PM=TIME(HOUR(A1)+2, MINUTE(A1), 0) — Adds 2 hours to the time in A1Pro Tip: TIME handles overflow: TIME(25,0,0) wraps to 1:00 AM. Excel stores time as a decimal fraction of a day (0.5 = 12:00 PM). Use TIME values in FLOOR/CEILING for rounding times to intervals.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcDate & Time
=TIMEVALUE(time_text)
Converts a time stored as text into a decimal number that Excel recognizes as a time.
=TIMEVALUE("14:30:00") — Returns 0.604166... (the decimal representation of 2:30 PM)=TIMEVALUE("2:30 PM") — Also returns 0.604166...Pro Tip: TIMEVALUE is useful when times are imported as text strings. The result is a decimal between 0 (midnight) and 0.99999 (11:59:59 PM). Format the cell as Time to display correctly.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcDate & Time
=DAYS(end_date, start_date)
Returns the number of days between two dates.
=DAYS(B1, A1) — Returns the number of days from A1 to B1=DAYS(TODAY(), A1) — Days elapsed since the date in A1Pro Tip: DAYS is simply end_date - start_date. You can also subtract dates directly: =B1-A1. DAYS exists mainly for clarity and readability in formulas.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=QUOTIENT(numerator, denominator)
Returns the integer portion of a division (discards the remainder).
=QUOTIENT(10, 3) — Returns 3 (integer part of 10/3)=QUOTIENT(A1, 60) — Converts seconds to whole minutesPro Tip: QUOTIENT is equivalent to INT(A/B) for positive numbers. Use it with MOD for clean division: QUOTIENT gives the whole part, MOD gives the remainder.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=LOG(number, [base])
Returns the logarithm of a number to a specified base (default is 10).
=LOG(100) — Returns 2 (log base 10 of 100)=LOG(8, 2) — Returns 3 (log base 2 of 8)Pro Tip: Use LOG for base-10, LOG(n,2) for binary logarithms, and LN for natural logarithms (base e). Logarithms are essential for growth rate analysis and data normalization.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=EXP(number)
Returns e raised to the power of a given number.
=EXP(1) — Returns 2.71828... (the value of e)=EXP(LN(A1)) — Returns A1 (EXP and LN are inverse functions)Pro Tip: EXP is the inverse of LN. It is used in exponential growth models, continuous compounding calculations, and probability distributions.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=LN(number)
Returns the natural logarithm (base e) of a number.
=LN(2.71828) — Returns approximately 1=LN(EXP(5)) — Returns 5 (LN and EXP are inverse functions)Pro Tip: LN is used in continuous compounding, growth rate calculations, and statistics. To convert between log bases: LOG_b(x) = LN(x) / LN(b).
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcDynamic Array
=WRAPROWS(vector, wrap_count, [pad_with])
Wraps a one-dimensional array into a 2D array with a specified number of columns.
=WRAPROWS(A1:A12, 4) — Converts 12 values into a 3-row by 4-column array=WRAPROWS(A1:A10, 3, "N/A") — Wraps into 3 columns, padding incomplete rows with N/APro Tip: WRAPROWS is the inverse of TOCOL when scanned by row. Use it to reshape flat data into a structured table format with a specific number of columns.
Works in: Excel 365, Google SheetsDynamic Array
=MAP(array1, [array2, ...], lambda)
Applies a LAMBDA function to each element of one or more arrays and returns the results as an array.
=MAP(A1:A10, LAMBDA(x, x^2 + 1)) — Squares each value and adds 1=MAP(A1:A10, B1:B10, LAMBDA(a, b, a*b)) — Multiplies corresponding elements of two arraysPro Tip: MAP replaces many array formula patterns. It applies a custom function element-by-element and is cleaner than Ctrl+Shift+Enter array formulas. Pair with named LAMBDA functions for reusable transformations.
Works in: Excel 365, Google SheetsDynamic Array
=REDUCE(initial_value, array, lambda)
Reduces an array to a single accumulated value by applying a LAMBDA function to each element.
=REDUCE(0, A1:A10, LAMBDA(acc, x, acc + x)) — Sums values (like SUM but using REDUCE)=REDUCE(1, A1:A5, LAMBDA(acc, x, acc * x)) — Multiplies all values together (product)Pro Tip: REDUCE processes elements left-to-right, carrying an accumulator. It can compute running totals, products, or any custom aggregation that existing functions do not support natively.
Works in: Excel 365, Google SheetsDynamic Array
=BYROW(array, lambda)
Applies a LAMBDA function to each row of an array and returns a single-column result.
=BYROW(A1:D10, LAMBDA(row, SUM(row))) — Sums each row and returns a column of row totals=BYROW(A1:C10, LAMBDA(row, MAX(row)-MIN(row))) — Returns the range (max-min) for each rowPro Tip: BYROW is like a formula-based version of applying a function across columns for each row. The LAMBDA receives the entire row as an array. Use BYCOL for column-wise operations.
Works in: Excel 365, Google SheetsDate & Time
=ISOWEEKNUM(date)
Returns the ISO 8601 week number of the year for a given date.
=ISOWEEKNUM(TODAY()) — Returns the current ISO week number=ISOWEEKNUM("2024-01-01") — Returns 1 (Jan 1, 2024 falls in ISO week 1)Pro Tip: ISO weeks always start on Monday and week 1 is the week containing the first Thursday of the year. This is the international standard used in most countries outside the US.
Works in: Excel 365, Excel 2021, Excel 2019, Google SheetsFinancial
=IPMT(rate, per, nper, pv, [fv], [type])
Returns the interest payment for a specific period of a loan or investment.
=IPMT(5%/12, 1, 360, -250000) — Interest portion of the 1st month's payment on a $250K mortgage at 5%=IPMT(0.06/12, 24, 60, -20000) — Interest portion of the 24th payment on a $20K loanPro Tip: IPMT + PPMT = PMT for any given period. Use these to build amortization schedules showing exactly how much of each payment goes to interest vs. principal.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcFinancial
=PPMT(rate, per, nper, pv, [fv], [type])
Returns the principal payment for a specific period of a loan or investment.
=PPMT(5%/12, 1, 360, -250000) — Principal portion of the 1st month's payment on a $250K mortgage=PPMT(0.06/12, 60, 60, -20000) — Principal portion of the final paymentPro Tip: Early in a loan, most of the payment is interest (IPMT). As the loan matures, more goes to principal (PPMT). Build an amortization table to visualize this shift.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcText
=DOLLAR(number, [decimals])
Converts a number to text formatted as currency using the $ symbol.
=DOLLAR(1234.567) — Returns "$1,234.57" (2 decimal places by default)=DOLLAR(1234.567, 0) — Returns "$1,235"Pro Tip: DOLLAR returns text, not a number. Use it when you need currency-formatted text for labels or concatenation. For number formatting, use the cell format or TEXT function instead.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcText
=FIXED(number, [decimals], [no_commas])
Rounds a number to the specified number of decimals and returns it as formatted text.
=FIXED(1234.567, 2) — Returns "1,234.57"=FIXED(1234.567, 1, TRUE) — Returns "1234.6" (no comma separator)Pro Tip: FIXED returns text, not a number. It is similar to TEXT but with simpler syntax for basic number formatting. Set no_commas to TRUE to omit thousands separators.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcText
=TEXTSPLIT(text, col_delimiter, [row_delimiter], [ignore_empty], [match_mode], [pad_with])
Splits a text string into an array of substrings using specified column and row delimiters.
=TEXTSPLIT("Apple,Banana,Cherry", ",") — Returns a horizontal array: Apple | Banana | Cherry=TEXTSPLIT("A.1,B.2,C.3", ",", ".") — Splits into a 2D array using comma for columns and period for rowsPro Tip: TEXTSPLIT is the modern replacement for complex LEFT/MID/RIGHT parsing. It can produce both 1D and 2D arrays. Use match_mode 1 for case-insensitive delimiter matching.
Works in: Excel 365, Google SheetsText
=TEXTBEFORE(text, delimiter, [instance_num], [match_mode], [match_end], [if_not_found])
Returns text that occurs before a specified delimiter.
=TEXTBEFORE("John-Smith-Jr", "-") — Returns "John"=TEXTBEFORE("John-Smith-Jr", "-", 2) — Returns "John-Smith" (text before the 2nd hyphen)Pro Tip: Use negative instance_num to search from the end. TEXTBEFORE replaces complex FIND/LEFT combinations. Set match_mode to 1 for case-insensitive matching.
Works in: Excel 365, Google SheetsText
=TEXTAFTER(text, delimiter, [instance_num], [match_mode], [match_end], [if_not_found])
Returns text that occurs after a specified delimiter.
=TEXTAFTER("John-Smith-Jr", "-") — Returns "Smith-Jr"=TEXTAFTER("John-Smith-Jr", "-", 2) — Returns "Jr" (text after the 2nd hyphen)Pro Tip: Use negative instance_num to search from the end. TEXTAFTER replaces complex MID/FIND/LEN combinations. Set match_mode to 1 for case-insensitive matching.
Works in: Excel 365, Google SheetsText
=ARRAYTOTEXT(array, [format])
Returns an array of values as a text string. Format 0 gives concise output; format 1 gives strict output with delimiters.
=ARRAYTOTEXT(A1:C1, 0) — Returns "Apple, Banana, Cherry" (concise format)=ARRAYTOTEXT(A1:B2, 1) — Returns {"Apple","Banana";"Cherry","Date"} (strict format)Pro Tip: Format 0 (default) returns a comma-separated string. Format 1 returns Excel array literal syntax with curly braces, semicolons for rows, and quotes around text. Useful for debugging array formulas.
Works in: Excel 365, Google SheetsText
=VALUETOTEXT(value, [format])
Returns a single value as text. Format 0 gives concise output; format 1 gives strict output preserving format characters.
=VALUETOTEXT(123, 0) — Returns "123" (concise)=VALUETOTEXT("Hello", 1) — Returns ""Hello"" (strict, with quotes)Pro Tip: VALUETOTEXT is similar to TEXT but does not require a format string. Format 1 wraps text values in quotes, which is useful for generating formula strings or code.
Works in: Excel 365, Google SheetsText
=UNICHAR(number)
Returns the Unicode character referenced by the given numeric value.
=UNICHAR(9733) — Returns a black star character=UNICHAR(128522) — Returns a smiley face emoji=UNICHAR(169) — Returns the copyright symbolPro Tip: UNICHAR supports the full Unicode range, unlike CHAR which is limited to ASCII/ANSI (0-255). Use it to insert special symbols, emojis, and international characters into cells.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcText
=UNICODE(text)
Returns the Unicode code point for the first character of a text string.
=UNICODE("A") — Returns 65=UNICODE("é") — Returns 233 (Unicode for accented e)Pro Tip: UNICODE is the extended version of CODE that supports the full Unicode character set. Use it to identify special characters in imported text or to create custom sorting logic.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcText
=BAHTTEXT(number)
Converts a number to Thai text and adds the Thai currency suffix (Baht).
=BAHTTEXT(1234.5) — Returns the number spelled out in Thai Baht currency formatPro Tip: BAHTTEXT is a specialized function for Thai locale financial documents. It converts numbers to the Thai script representation of Baht currency, similar to how checks spell out amounts in words.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcText
=ASC(text)
Converts full-width (double-byte) characters to half-width (single-byte) characters in a text string. Primarily for East Asian languages.
=ASC("ABC") — Converts full-width ABC to half-width ABCPro Tip: ASC is essential when working with Japanese, Chinese, or Korean text where full-width characters may need to be converted to half-width for data consistency or formatting purposes.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcText
=JIS(text)
Converts half-width (single-byte) characters to full-width (double-byte) characters in a text string. Primarily for East Asian languages.
=JIS("ABC") — Converts half-width ABC to full-width charactersPro Tip: JIS is the inverse of ASC. Use it when you need to standardize text to full-width characters for Japanese or other East Asian language documents.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcText
=PHONETIC(reference)
Extracts the phonetic (furigana) characters from a text string. Primarily used with Japanese text in Excel.
=PHONETIC(A1) — Returns the furigana reading of Japanese text in A1Pro Tip: PHONETIC reads the phonetic guide (furigana) that is stored with Japanese text when entered via IME. It only works in the Windows version of Excel with Japanese text that has furigana attached.
Works in: Excel 365, Excel 2021, Excel 2019Text
=T(value)
Returns the text referred to by value if it is text, or an empty string if it is not text.
=T("Hello") — Returns "Hello"=T(123) — Returns "" (empty string, because 123 is a number)=T(A1) — Returns A1's value if it is text, otherwise returns empty stringPro Tip: T is rarely needed in modern Excel but can be useful for ensuring a value is treated as text in formulas, or for stripping non-text values to empty strings in data cleaning workflows.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcText
=WIDECHAR(text)
Converts half-width (single-byte) ASCII and katakana characters to full-width (double-byte) characters.
=WIDECHAR("Hello") — Converts the text to full-width charactersPro Tip: WIDECHAR is similar to JIS and is used for East Asian language support. It converts standard ASCII characters to their full-width Unicode equivalents for display consistency in CJK documents.
Works in: Excel 365, Google SheetsMath & Trigonometry
=SIGN(number)
Returns the sign of a number: 1 for positive, -1 for negative, 0 for zero.
=SIGN(-42) — Returns -1=SIGN(100) — Returns 1=SIGN(0) — Returns 0Pro Tip: SIGN is useful for conditional formatting logic, determining the direction of change, or normalizing values to their direction (multiply by SIGN to keep direction while changing magnitude).
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=PI()
Returns the value of pi (3.14159265358979...).
=PI() — Returns 3.14159265358979...=PI()*A1^2 — Calculates the area of a circle with radius in A1Pro Tip: PI() returns pi to 15 decimal places. Use it for circle calculations, trigonometry, and angle conversions (radians = degrees * PI()/180).
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=RADIANS(angle)
Converts degrees to radians.
=RADIANS(180) — Returns 3.14159... (pi)=SIN(RADIANS(45)) — Sine of 45 degreesPro Tip: Excel's trig functions (SIN, COS, TAN) expect radians, not degrees. Always wrap degree values in RADIANS() before passing to trig functions.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=DEGREES(angle)
Converts radians to degrees.
=DEGREES(PI()) — Returns 180=DEGREES(ATAN2(x, y)) — Converts an angle from radians to degreesPro Tip: Use DEGREES to convert the output of inverse trig functions (ASIN, ACOS, ATAN) back to degrees for human-readable results.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=SIN(number)
Returns the sine of an angle specified in radians.
=SIN(PI()/2) — Returns 1 (sine of 90 degrees)=SIN(RADIANS(30)) — Returns 0.5 (sine of 30 degrees)Pro Tip: SIN expects the angle in radians. Wrap degree values in RADIANS() first. SIN is fundamental for wave calculations, circular motion, and trigonometric modeling.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=COS(number)
Returns the cosine of an angle specified in radians.
=COS(0) — Returns 1 (cosine of 0 degrees)=COS(RADIANS(60)) — Returns 0.5 (cosine of 60 degrees)Pro Tip: COS expects radians. Use RADIANS() to convert degrees. Cosine is used in physics, engineering, and signal processing for phase-shifted wave calculations.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=TAN(number)
Returns the tangent of an angle specified in radians.
=TAN(RADIANS(45)) — Returns 1 (tangent of 45 degrees)=TAN(PI()/4) — Returns 1Pro Tip: TAN is undefined at 90 degrees (PI/2 radians) and its odd multiples. Use TAN for slope calculations: the tangent of an angle equals rise over run.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=ASIN(number)
Returns the arcsine (inverse sine) of a number, in radians. The input must be between -1 and 1.
=ASIN(0.5) — Returns 0.5236... (PI/6 radians, or 30 degrees)=DEGREES(ASIN(0.5)) — Returns 30 (converts the result to degrees)Pro Tip: ASIN returns a value between -PI/2 and PI/2. Wrap in DEGREES() to get the result in degrees. Input values outside -1 to 1 return #NUM! error.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=ACOS(number)
Returns the arccosine (inverse cosine) of a number, in radians. The input must be between -1 and 1.
=ACOS(0.5) — Returns 1.0472... (PI/3 radians, or 60 degrees)=DEGREES(ACOS(0)) — Returns 90Pro Tip: ACOS returns a value between 0 and PI. Use DEGREES(ACOS(value)) to get the angle in degrees. Useful for calculating angles in geometry and navigation.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=ATAN(number)
Returns the arctangent (inverse tangent) of a number, in radians.
=ATAN(1) — Returns 0.7854... (PI/4 radians, or 45 degrees)=DEGREES(ATAN(1)) — Returns 45Pro Tip: ATAN returns a value between -PI/2 and PI/2. For a full-range angle (all four quadrants), use ATAN2 which accepts both x and y coordinates.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=ATAN2(x_num, y_num)
Returns the arctangent of the specified x and y coordinates, in radians. Returns an angle between -PI and PI.
=ATAN2(1, 1) — Returns 0.7854... (PI/4 radians, or 45 degrees)=DEGREES(ATAN2(-1, 1)) — Returns 135 (angle in the second quadrant)Pro Tip: Unlike ATAN, ATAN2 distinguishes between all four quadrants and handles the case where x is 0. Note that Excel uses (x, y) order, not (y, x) like some programming languages.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=SINH(number)
Returns the hyperbolic sine of a number.
=SINH(0) — Returns 0=SINH(1) — Returns 1.1752... (approximately (e - 1/e) / 2)Pro Tip: Hyperbolic functions are used in engineering for catenary curves (hanging cables), heat transfer, and special relativity calculations.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=COSH(number)
Returns the hyperbolic cosine of a number.
=COSH(0) — Returns 1=COSH(1) — Returns 1.5431... (approximately (e + 1/e) / 2)Pro Tip: COSH describes the shape of a hanging cable or chain (catenary curve). It is always greater than or equal to 1 for real inputs.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=TANH(number)
Returns the hyperbolic tangent of a number.
=TANH(0) — Returns 0=TANH(1) — Returns 0.7616...Pro Tip: TANH output is always between -1 and 1, making it useful as a sigmoid-like activation function in machine learning models and neural networks.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=PRODUCT(number1, [number2], ...)
Multiplies all the numbers given as arguments and returns the product.
=PRODUCT(A1:A5) — Multiplies all values in A1 through A5 together=PRODUCT(2, 3, 4) — Returns 24 (2 x 3 x 4)Pro Tip: PRODUCT ignores text and logical values in ranges. It is the multiplication equivalent of SUM. For conditional products, use SUMPRODUCT with logarithms or a helper column.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=FACT(number)
Returns the factorial of a number (n! = n x (n-1) x ... x 2 x 1).
=FACT(5) — Returns 120 (5 x 4 x 3 x 2 x 1)=FACT(0) — Returns 1 (0! = 1 by definition)Pro Tip: Factorials grow extremely fast. FACT(170) is the largest factorial Excel can calculate before returning #NUM!. Factorials are used in permutations, combinations, and probability.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=FACTDOUBLE(number)
Returns the double factorial of a number (n!! = product of all integers from 1 to n that have the same parity as n).
=FACTDOUBLE(7) — Returns 105 (7 x 5 x 3 x 1)=FACTDOUBLE(6) — Returns 48 (6 x 4 x 2)Pro Tip: Double factorial is not the same as factorial applied twice. It multiplies every other integer: odd!! = 1*3*5*...*n and even!! = 2*4*6*...*n. Used in advanced statistics and physics.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=GCD(number1, [number2], ...)
Returns the greatest common divisor of two or more integers.
=GCD(12, 18) — Returns 6 (largest number that divides both evenly)=GCD(24, 36, 48) — Returns 12Pro Tip: GCD is useful for simplifying fractions: divide both numerator and denominator by GCD. For example, 12/18 simplifies to 2/3 since GCD(12,18)=6.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=LCM(number1, [number2], ...)
Returns the least common multiple of two or more integers.
=LCM(4, 6) — Returns 12 (smallest number divisible by both 4 and 6)=LCM(3, 5, 7) — Returns 105Pro Tip: LCM is helpful for finding common denominators in fractions and scheduling problems (e.g., when will two recurring events coincide?).
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=COMBIN(number, number_chosen)
Returns the number of combinations for a given number of items (order does not matter).
=COMBIN(10, 3) — Returns 120 (ways to choose 3 items from 10)=COMBIN(52, 5) — Returns 2,598,960 (number of possible 5-card poker hands)Pro Tip: COMBIN calculates n! / (k! * (n-k)!). Use COMBIN for lottery odds, team selection problems, or any scenario where order does not matter. Use PERMUT when order matters.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=PERMUT(number, number_chosen)
Returns the number of permutations for a given number of items (order matters).
=PERMUT(10, 3) — Returns 720 (ways to arrange 3 items from 10 in order)=PERMUT(4, 4) — Returns 24 (ways to arrange 4 items, same as FACT(4))Pro Tip: PERMUT calculates n! / (n-k)!. It returns more results than COMBIN because order matters. Use PERMUT for PIN codes, race finishing orders, or password combinations.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=ROMAN(number, [form])
Converts an Arabic numeral to Roman numeral as text.
=ROMAN(2024) — Returns "MMXXIV"=ROMAN(499) — Returns "CDXCIX"Pro Tip: The form parameter (0-4) controls how concise the Roman numeral is. Form 0 (default) is classic, higher forms are more concise. Maximum input is 3999.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=ARABIC(text)
Converts a Roman numeral text string to an Arabic numeral.
=ARABIC("MMXXIV") — Returns 2024=ARABIC("XIV") — Returns 14Pro Tip: ARABIC is the inverse of ROMAN. It accepts both uppercase and lowercase Roman numerals. Returns #VALUE! for invalid Roman numeral strings.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=EVEN(number)
Rounds a number up to the nearest even integer, away from zero.
=EVEN(3) — Returns 4=EVEN(2.5) — Returns 4=EVEN(-3) — Returns -4 (rounds away from zero)Pro Tip: EVEN always rounds away from zero to the next even number. Use it for packaging calculations where items come in pairs or for rounding to even increments.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=ODD(number)
Rounds a number up to the nearest odd integer, away from zero.
=ODD(2) — Returns 3=ODD(4.5) — Returns 5=ODD(-2) — Returns -3 (rounds away from zero)Pro Tip: ODD always rounds away from zero to the next odd number. Combined with EVEN, it is useful for alternating patterns or ensuring specific parity in results.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=MULTINOMIAL(number1, [number2], ...)
Returns the multinomial of a set of numbers, calculated as the factorial of the sum divided by the product of factorials.
=MULTINOMIAL(2, 3, 4) — Returns 1260 (9! / (2! * 3! * 4!))=MULTINOMIAL(3, 3) — Returns 20 (6! / (3! * 3!))Pro Tip: The multinomial coefficient counts the number of ways to divide a set into groups of specified sizes. It generalizes COMBIN to more than two groups.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=SERIESSUM(x, n, m, coefficients)
Returns the sum of a power series: SUM(coefficients[i] * x^(n + i*m)).
=SERIESSUM(PI()/4, 0, 2, {1, -1/2, 1/24}) — Approximates cosine using the first three terms of its Taylor seriesPro Tip: SERIESSUM is useful for evaluating polynomial approximations, Taylor series, and Fourier series. The coefficients array defines the terms of the power series.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=MDETERM(array)
Returns the matrix determinant of a square array.
=MDETERM({1,2;3,4}) — Returns -2 (determinant of a 2x2 matrix)=MDETERM(A1:C3) — Returns the determinant of a 3x3 matrix in A1:C3Pro Tip: A determinant of 0 means the matrix is singular (no inverse). Determinants are used in solving systems of linear equations and calculating area/volume in geometry.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=MINVERSE(array)
Returns the inverse matrix for a square matrix stored in an array.
=MINVERSE(A1:B2) — Returns the 2x2 inverse matrix=MINVERSE({4,7;2,6}) — Returns the inverse of the given 2x2 matrixPro Tip: A matrix multiplied by its inverse gives the identity matrix. MINVERSE is used to solve systems of linear equations: X = MINVERSE(A) * B. The matrix must be square and non-singular.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=MMULT(array1, array2)
Returns the matrix product of two arrays. The number of columns in array1 must equal the number of rows in array2.
=MMULT(A1:B2, C1:D2) — Multiplies two 2x2 matrices=MMULT(A1:C3, D1:D3) — Multiplies a 3x3 matrix by a 3x1 column vectorPro Tip: MMULT is essential for linear algebra in Excel. Use it with MINVERSE to solve linear equations, or with TRANSPOSE for advanced array calculations like weighted scoring models.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=CEILING.MATH(number, [significance], [mode])
Rounds a number up to the nearest integer or to the nearest multiple of significance. Handles negative numbers based on mode.
=CEILING.MATH(4.3) — Returns 5 (rounds up to nearest integer)=CEILING.MATH(6.7, 2) — Returns 8 (rounds up to nearest multiple of 2)=CEILING.MATH(-4.3, 2, 1) — Returns -6 (rounds away from zero when mode is 1)Pro Tip: CEILING.MATH is the modern replacement for CEILING. It handles negative numbers more intuitively and does not require number and significance to have the same sign.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=FLOOR.MATH(number, [significance], [mode])
Rounds a number down to the nearest integer or to the nearest multiple of significance. Handles negative numbers based on mode.
=FLOOR.MATH(4.7) — Returns 4 (rounds down to nearest integer)=FLOOR.MATH(6.7, 2) — Returns 6 (rounds down to nearest multiple of 2)=FLOOR.MATH(-4.3, 2, 1) — Returns -4 (rounds toward zero when mode is 1)Pro Tip: FLOOR.MATH is the modern replacement for FLOOR. It handles negative numbers more intuitively and does not require number and significance to have the same sign.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=CEILING.PRECISE(number, [significance])
Rounds a number up to the nearest integer or to the nearest multiple of significance, regardless of sign.
=CEILING.PRECISE(4.3, 1) — Returns 5=CEILING.PRECISE(-4.3, 2) — Returns -4 (rounds toward positive infinity)Pro Tip: CEILING.PRECISE always rounds toward positive infinity, making it predictable for both positive and negative numbers. The significance is always treated as positive.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=FLOOR.PRECISE(number, [significance])
Rounds a number down to the nearest integer or to the nearest multiple of significance, regardless of sign.
=FLOOR.PRECISE(4.7, 1) — Returns 4=FLOOR.PRECISE(-4.3, 2) — Returns -6 (rounds toward negative infinity)Pro Tip: FLOOR.PRECISE always rounds toward negative infinity, making it predictable for both positive and negative numbers. The significance is always treated as positive.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=CSC(number)
Returns the cosecant of an angle specified in radians (reciprocal of sine).
=CSC(PI()/6) — Returns 2 (cosecant of 30 degrees)=CSC(RADIANS(45)) — Returns 1.4142... (square root of 2)Pro Tip: CSC(x) = 1/SIN(x). It is undefined when SIN(x) = 0 (at multiples of PI). Primarily used in advanced mathematics and engineering calculations.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=SEC(number)
Returns the secant of an angle specified in radians (reciprocal of cosine).
=SEC(0) — Returns 1 (secant of 0 degrees)=SEC(RADIANS(60)) — Returns 2 (secant of 60 degrees)Pro Tip: SEC(x) = 1/COS(x). It is undefined when COS(x) = 0 (at odd multiples of PI/2). Used in calculus, physics, and certain engineering applications.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=COT(number)
Returns the cotangent of an angle specified in radians (reciprocal of tangent).
=COT(RADIANS(45)) — Returns 1 (cotangent of 45 degrees)=COT(PI()/4) — Returns 1Pro Tip: COT(x) = 1/TAN(x) = COS(x)/SIN(x). It is undefined when SIN(x) = 0 (at multiples of PI). Used in certain geometric and trigonometric calculations.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=ACOT(number)
Returns the arccotangent (inverse cotangent) of a number, in radians.
=ACOT(1) — Returns 0.7854... (PI/4 radians, or 45 degrees)=DEGREES(ACOT(1)) — Returns 45Pro Tip: ACOT returns a value between 0 and PI. It is the inverse of COT. Wrap the result in DEGREES() for a human-readable angle.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=QUARTILE(array, quart)
Returns the quartile of a dataset (0 = min, 1 = 25th percentile, 2 = median, 3 = 75th percentile, 4 = max).
=QUARTILE(A1:A100, 1) — Returns the 25th percentile (Q1)=QUARTILE(A1:A100, 3) - QUARTILE(A1:A100, 1) — Calculates the interquartile range (IQR)Pro Tip: The interquartile range (Q3-Q1) is a robust measure of spread. Values below Q1-1.5*IQR or above Q3+1.5*IQR are commonly considered outliers.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=CORREL(array1, array2)
Returns the Pearson correlation coefficient between two datasets (-1 to 1).
=CORREL(A1:A100, B1:B100) — Returns the correlation between the two data seriesPro Tip: Values near 1 indicate strong positive correlation, near -1 indicate strong negative correlation, and near 0 indicate no linear relationship. CORREL measures linear relationships only.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=FORECAST(x, known_y's, known_x's)
Predicts a future value using linear regression based on existing data.
=FORECAST(13, B1:B12, A1:A12) — Predicts the value for month 13 based on 12 months of dataPro Tip: FORECAST uses simple linear regression (y = mx + b). For more advanced forecasting, use FORECAST.ETS which handles seasonality and trends. FORECAST.LINEAR is the modern replacement.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=SLOPE(known_y's, known_x's)
Returns the slope of the linear regression line through the given data points.
=SLOPE(B1:B12, A1:A12) — Returns the rate of change (slope) of the trend linePro Tip: The slope tells you the rate of change: for every 1-unit increase in x, y changes by the slope value. Combine with INTERCEPT for the full equation: y = SLOPE*x + INTERCEPT.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=INTERCEPT(known_y's, known_x's)
Returns the y-intercept of the linear regression line through the given data points.
=INTERCEPT(B1:B12, A1:A12) — Returns the y-intercept of the trend linePro Tip: The intercept is the predicted y value when x is 0. Together, SLOPE and INTERCEPT define the regression equation: y = SLOPE*x + INTERCEPT.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=AVERAGEA(value1, [value2], ...)
Returns the average of its arguments, including text and logical values. TRUE counts as 1, FALSE and text as 0.
=AVERAGEA(A1:A10) — Averages all values, treating TRUE as 1, FALSE and text as 0=AVERAGEA(1, 2, TRUE, FALSE) — Returns 1 ((1+2+1+0)/4)Pro Tip: Unlike AVERAGE which ignores text and logical values in ranges, AVERAGEA includes them. TRUE=1, FALSE=0, text=0. Use AVERAGEA when you want non-numeric cells to count as zero.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=MINA(value1, [value2], ...)
Returns the smallest value in a set of values, including text and logical values. TRUE counts as 1, FALSE and text as 0.
=MINA(A1:A10) — Returns the minimum, treating TRUE as 1, FALSE and text as 0=MINA(5, 3, TRUE, FALSE) — Returns 0 (FALSE is treated as 0)Pro Tip: MINA is useful when your data contains logical values or text that should be included in the minimum calculation. Text strings evaluate to 0, which may become the minimum.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=MAXA(value1, [value2], ...)
Returns the largest value in a set of values, including text and logical values. TRUE counts as 1, FALSE and text as 0.
=MAXA(A1:A10) — Returns the maximum, treating TRUE as 1, FALSE and text as 0=MAXA(-5, -3, FALSE) — Returns 0 (FALSE is treated as 0)Pro Tip: MAXA includes logical values and text in the evaluation, unlike MAX which ignores them. This can be useful for datasets where TRUE/FALSE values should factor into the result.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=MODE.SNGL(number1, [number2], ...)
Returns the most frequently occurring (single mode) value in a dataset. Replacement for the legacy MODE function.
=MODE.SNGL(A1:A100) — Returns the single most common value=MODE.SNGL(1, 2, 2, 3, 3, 3) — Returns 3 (appears most often)Pro Tip: MODE.SNGL returns only one mode even if multiple values have the same highest frequency. For all modes, use MODE.MULT. Returns #N/A if no value appears more than once.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=MODE.MULT(number1, [number2], ...)
Returns a vertical array of the most frequently occurring values in a dataset (handles multiple modes).
=MODE.MULT(A1:A100) — Returns all modal values as a spilled array=MODE.MULT(1, 1, 2, 2, 3) — Returns {1; 2} since both appear twicePro Tip: MODE.MULT spills in Excel 365. In older versions, select multiple cells, enter the formula, and press Ctrl+Shift+Enter. Returns #N/A if no value repeats.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=RANK.AVG(number, ref, [order])
Returns the rank of a number in a list. Tied values receive an average rank.
=RANK.AVG(A1, $A$1:$A$50) — Returns A1's rank with ties averaged (1 = highest by default)=RANK.AVG(A1, $A$1:$A$50, 1) — Ascending rank with ties averagedPro Tip: RANK.AVG averages the ranks for tied values. For example, two values tied for 3rd place both get rank 3.5. This is preferred in statistical analysis to avoid rank gaps.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=RANK.EQ(number, ref, [order])
Returns the rank of a number in a list. Tied values receive the same (top) rank.
=RANK.EQ(A1, $A$1:$A$50) — Returns A1's rank (1 = highest by default)=RANK.EQ(A1, $A$1:$A$50, 1) — Returns ascending rank (1 = smallest)Pro Tip: RANK.EQ is the modern replacement for RANK. Tied values get the same rank and subsequent ranks are skipped. For example, two 3rd-place ties mean there is no 4th place.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=PERCENTILE.INC(array, k)
Returns the k-th percentile of values in a range, inclusive (k is between 0 and 1 inclusive).
=PERCENTILE.INC(A1:A100, 0.9) — Returns the 90th percentile=PERCENTILE.INC(A1:A100, 0) — Returns the minimum value (0th percentile)Pro Tip: PERCENTILE.INC is the modern replacement for PERCENTILE. It includes the 0th and 100th percentiles (k can be 0 or 1). Use PERCENTILE.EXC for exclusive percentiles.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=PERCENTILE.EXC(array, k)
Returns the k-th percentile of values in a range, exclusive (k must be between 0 and 1 exclusive).
=PERCENTILE.EXC(A1:A100, 0.25) — Returns the 25th percentile (exclusive method)=PERCENTILE.EXC(A1:A100, 0.5) — Returns the median (exclusive method)Pro Tip: PERCENTILE.EXC uses interpolation and excludes the 0th and 100th percentiles. It requires k to be between 1/(n+1) and n/(n+1). More commonly used in academic statistics.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=QUARTILE.INC(array, quart)
Returns the quartile of a dataset using the inclusive method (0 = min, 1 = Q1, 2 = median, 3 = Q3, 4 = max).
=QUARTILE.INC(A1:A100, 1) — Returns the 25th percentile (Q1)=QUARTILE.INC(A1:A100, 3) - QUARTILE.INC(A1:A100, 1) — Calculates the interquartile range (IQR)Pro Tip: QUARTILE.INC is the modern replacement for QUARTILE. It is equivalent to PERCENTILE.INC at 0, 0.25, 0.5, 0.75, and 1. Use IQR to detect outliers.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=QUARTILE.EXC(array, quart)
Returns the quartile of a dataset using the exclusive method (1 = Q1, 2 = median, 3 = Q3).
=QUARTILE.EXC(A1:A100, 1) — Returns Q1 using the exclusive method=QUARTILE.EXC(A1:A100, 3) — Returns Q3 using the exclusive methodPro Tip: QUARTILE.EXC does not accept quart values of 0 or 4 (unlike INC). It uses the exclusive interpolation method preferred in some statistical applications.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=STDEV.S(number1, [number2], ...)
Estimates standard deviation based on a sample (uses n-1 denominator). Modern replacement for STDEV.
=STDEV.S(A1:A100) — Returns the sample standard deviation=STDEV.S(85, 90, 78, 92, 88) — Returns ~5.22Pro Tip: STDEV.S is the modern name for STDEV. Use it for sample data (most real-world scenarios). For an entire population, use STDEV.P. The S stands for Sample.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=STDEV.P(number1, [number2], ...)
Calculates standard deviation based on the entire population (uses n denominator).
=STDEV.P(A1:A100) — Returns the population standard deviation=STDEV.P(85, 90, 78, 92, 88) — Returns ~4.67Pro Tip: Use STDEV.P only when your data represents the entire population (e.g., test scores for all students in a class). For samples from a larger population, use STDEV.S.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=VAR.S(number1, [number2], ...)
Estimates variance based on a sample (uses n-1 denominator). Modern replacement for VAR.
=VAR.S(A1:A100) — Returns the sample variancePro Tip: VAR.S is the square of STDEV.S. It uses the n-1 denominator (Bessel's correction) for unbiased estimation from sample data. The S stands for Sample.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=VAR.P(number1, [number2], ...)
Calculates variance based on the entire population (uses n denominator).
=VAR.P(A1:A100) — Returns the population variancePro Tip: Use VAR.P only when your data represents the entire population. It uses n as the denominator, giving a smaller result than VAR.S for the same data.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=NORM.DIST(x, mean, standard_dev, cumulative)
Returns the normal distribution for the specified mean and standard deviation. Set cumulative to TRUE for CDF, FALSE for PDF.
=NORM.DIST(1.5, 0, 1, TRUE) — Returns ~0.933 (CDF of standard normal at 1.5)=NORM.DIST(100, 80, 10, TRUE) — Probability that a value is at most 100 with mean 80 and stdev 10Pro Tip: Set cumulative to TRUE for the probability that a random variable is less than or equal to x. Set to FALSE for the probability density at exactly x. Essential for quality control and statistics.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=NORM.INV(probability, mean, standard_dev)
Returns the inverse of the normal cumulative distribution for the specified mean and standard deviation.
=NORM.INV(0.95, 0, 1) — Returns ~1.645 (the z-value for the 95th percentile)=NORM.INV(0.05, 100, 15) — Returns ~75.33 (5th percentile of IQ scores)Pro Tip: NORM.INV answers: what value has a given probability of being below it? Use it for confidence intervals, setting thresholds, and statistical testing.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=NORM.S.DIST(z, cumulative)
Returns the standard normal distribution (mean 0, standard deviation 1).
=NORM.S.DIST(1.96, TRUE) — Returns ~0.975 (CDF at z=1.96)=NORM.S.DIST(0, FALSE) — Returns ~0.399 (PDF at z=0, the peak of the bell curve)Pro Tip: The standard normal is NORM.DIST with mean=0 and stdev=1. Z-scores let you compare values from different normal distributions. 95% of values fall within z = +/- 1.96.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=NORM.S.INV(probability)
Returns the inverse of the standard normal cumulative distribution (mean 0, standard deviation 1).
=NORM.S.INV(0.975) — Returns ~1.96 (the z-value for the 97.5th percentile)=NORM.S.INV(0.5) — Returns 0 (the median of the standard normal)Pro Tip: NORM.S.INV is commonly used to find critical z-values for hypothesis testing. For a 95% two-tailed test, use NORM.S.INV(0.975) to get 1.96.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=T.DIST(x, deg_freedom, cumulative)
Returns the Student's t-distribution for the specified degrees of freedom.
=T.DIST(2, 10, TRUE) — Returns ~0.963 (CDF of t-distribution with 10 df at t=2)=T.DIST(1.5, 20, FALSE) — Returns the PDF value at t=1.5 with 20 dfPro Tip: The t-distribution is used instead of the normal distribution when sample sizes are small. As degrees of freedom increase, it approaches the normal distribution.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=T.INV(probability, deg_freedom)
Returns the left-tailed inverse of the Student's t-distribution.
=T.INV(0.975, 10) — Returns ~2.228 (critical t-value for 95% two-tailed with 10 df)=T.INV(0.95, 30) — Returns ~1.697 (one-tailed 95% critical value with 30 df)Pro Tip: For two-tailed tests, use T.INV(1-alpha/2, df). For example, for a 95% confidence interval with 10 df, use T.INV(0.975, 10). Use T.INV.2T for the two-tailed version directly.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=T.TEST(array1, array2, tails, type)
Returns the probability associated with a Student's t-test to determine if two samples are likely from the same population.
=T.TEST(A1:A20, B1:B20, 2, 2) — Two-tailed, two-sample equal variance t-test (returns p-value)=T.TEST(A1:A20, B1:B20, 1, 1) — One-tailed, paired t-testPro Tip: Type 1 = paired, Type 2 = two-sample equal variance, Type 3 = two-sample unequal variance (Welch's). A p-value below 0.05 typically indicates a statistically significant difference.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=F.DIST(x, deg_freedom1, deg_freedom2, cumulative)
Returns the F probability distribution, used in analysis of variance (ANOVA) and comparing variances.
=F.DIST(3.5, 5, 10, TRUE) — Returns ~0.957 (CDF of F-distribution)=F.DIST(2, 3, 20, FALSE) — Returns the PDF value of the F-distributionPro Tip: The F-distribution is always positive and right-skewed. It is used in ANOVA, regression analysis, and comparing variances between two populations.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=F.INV(probability, deg_freedom1, deg_freedom2)
Returns the inverse of the F probability distribution.
=F.INV(0.95, 5, 10) — Returns the critical F-value for 95% confidence with 5 and 10 dfPro Tip: Use F.INV to find critical F-values for ANOVA and regression significance tests. Compare your calculated F-statistic to F.INV to determine statistical significance.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=F.TEST(array1, array2)
Returns the result of an F-test, which compares the variances of two datasets and returns the two-tailed probability.
=F.TEST(A1:A20, B1:B20) — Returns the p-value for whether the two datasets have equal variancesPro Tip: Use F.TEST before a t-test to determine if you should use equal or unequal variance assumptions. A p-value below 0.05 suggests the variances are significantly different.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=CHISQ.DIST(x, deg_freedom, cumulative)
Returns the chi-squared distribution, used for goodness-of-fit tests and independence tests.
=CHISQ.DIST(5.99, 2, TRUE) — Returns ~0.950 (CDF of chi-squared with 2 df)=CHISQ.DIST(3.84, 1, TRUE) — Returns ~0.950 (critical value check for 1 df)Pro Tip: The chi-squared distribution is used for categorical data analysis: goodness-of-fit tests, tests of independence, and confidence intervals for variance.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=CHISQ.INV(probability, deg_freedom)
Returns the inverse of the left-tailed chi-squared distribution.
=CHISQ.INV(0.95, 2) — Returns ~5.99 (critical chi-squared value for 95% with 2 df)=CHISQ.INV(0.95, 1) — Returns ~3.84Pro Tip: Use CHISQ.INV to find critical values for chi-squared tests. Common use: CHISQ.INV(0.95, df) gives the 5% significance level critical value.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=CHISQ.TEST(actual_range, expected_range)
Returns the p-value from the chi-squared test for independence, comparing observed and expected frequencies.
=CHISQ.TEST(A1:B3, D1:E3) — Returns the p-value comparing observed (A1:B3) to expected (D1:E3) frequenciesPro Tip: A p-value below 0.05 typically indicates the observed frequencies differ significantly from expected. The expected range must have the same dimensions as the actual range.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=BINOM.DIST(number_s, trials, probability_s, cumulative)
Returns the individual or cumulative binomial distribution probability.
=BINOM.DIST(3, 10, 0.5, FALSE) — Probability of exactly 3 successes in 10 trials with 50% chance each=BINOM.DIST(3, 10, 0.5, TRUE) — Probability of 3 or fewer successesPro Tip: Use BINOM.DIST for binary outcome experiments (pass/fail, heads/tails). Set cumulative to TRUE for at most k successes, FALSE for exactly k successes.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=POISSON.DIST(x, mean, cumulative)
Returns the Poisson distribution, used for predicting the number of events occurring in a fixed interval.
=POISSON.DIST(3, 5, FALSE) — Probability of exactly 3 events when the average is 5=POISSON.DIST(2, 4, TRUE) — Probability of 2 or fewer events when the average is 4Pro Tip: Use Poisson for count data: customer arrivals per hour, defects per unit, calls per day. The mean equals both the expected value and variance of the distribution.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=EXPON.DIST(x, lambda, cumulative)
Returns the exponential distribution, used to model the time between events in a Poisson process.
=EXPON.DIST(2, 0.5, TRUE) — Probability that the wait time is at most 2, with rate 0.5=EXPON.DIST(1, 3, FALSE) — PDF of exponential distribution at x=1 with rate 3Pro Tip: Lambda is the rate parameter (1/mean). The exponential distribution models waiting times between Poisson events. It has the memoryless property.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=WEIBULL.DIST(x, alpha, beta, cumulative)
Returns the Weibull distribution, commonly used in reliability analysis and survival analysis.
=WEIBULL.DIST(5, 2, 10, TRUE) — Cumulative Weibull probability at x=5 with shape 2 and scale 10=WEIBULL.DIST(3, 1.5, 5, FALSE) — PDF of Weibull distributionPro Tip: Alpha (shape) controls the failure rate pattern: <1 = decreasing failure rate, =1 = constant (exponential), >1 = increasing failure rate (wear-out). Beta is the scale parameter.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=GAMMA.DIST(x, alpha, beta, cumulative)
Returns the gamma distribution, a generalization of the exponential and chi-squared distributions.
=GAMMA.DIST(5, 2, 1, TRUE) — Cumulative gamma probability at x=5 with shape 2 and rate 1=GAMMA.DIST(3, 3, 2, FALSE) — PDF of gamma distribution at x=3Pro Tip: The gamma distribution generalizes the exponential (alpha=1) and chi-squared (alpha=df/2, beta=2) distributions. Used in queuing theory and insurance claims modeling.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=GAMMA.INV(probability, alpha, beta)
Returns the inverse of the gamma cumulative distribution.
=GAMMA.INV(0.95, 2, 1) — Returns the value at which the gamma CDF equals 0.95Pro Tip: GAMMA.INV answers: what value has a given cumulative probability under the gamma distribution? Useful for setting thresholds in reliability and queuing models.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=CONFIDENCE.NORM(alpha, standard_dev, size)
Returns the confidence interval margin of error for a population mean using the normal distribution.
=CONFIDENCE.NORM(0.05, 10, 50) — Returns ~2.77 (margin of error for 95% confidence with stdev=10 and n=50)=AVERAGE(A1:A50) +/- CONFIDENCE.NORM(0.05, STDEV.S(A1:A50), 50) — Calculates the 95% confidence interval boundsPro Tip: Alpha is the significance level (0.05 for 95% confidence). The result is the margin of error; add/subtract it from the mean to get the confidence interval bounds.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=CONFIDENCE.T(alpha, standard_dev, size)
Returns the confidence interval margin of error for a population mean using the Student's t-distribution.
=CONFIDENCE.T(0.05, 10, 20) — Returns ~4.68 (margin of error for 95% confidence with stdev=10 and n=20)Pro Tip: Use CONFIDENCE.T instead of CONFIDENCE.NORM for small samples (n < 30) or when the population standard deviation is unknown. It produces wider intervals to account for uncertainty.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=LINEST(known_y's, [known_x's], [const], [stats])
Returns statistics for a linear regression model using the least squares method. Returns an array of coefficients and optionally additional statistics.
=LINEST(B1:B20, A1:A20) — Returns slope and intercept of the best-fit line=LINEST(B1:B20, A1:A20, TRUE, TRUE) — Returns full regression statistics including R-squared, standard errors, F-statisticPro Tip: With stats=TRUE, LINEST returns a 5-row array: row 1 = coefficients, row 2 = standard errors, row 3 = R-squared and standard error of y, row 4 = F-statistic and df, row 5 = regression SS and residual SS.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=LOGEST(known_y's, [known_x's], [const], [stats])
Returns statistics for an exponential regression model (y = b*m^x). Returns an array of coefficients.
=LOGEST(B1:B20, A1:A20) — Returns base and coefficient for exponential fit=LOGEST(B1:B20, A1:A20, TRUE, TRUE) — Returns full exponential regression statisticsPro Tip: LOGEST fits y = b * m^x (or y = b * m1^x1 * m2^x2 for multiple x variables). Use it when your data follows exponential growth rather than linear growth.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=GROWTH(known_y's, [known_x's], [new_x's], [const])
Predicts exponential growth by fitting an exponential curve to existing data and returning predicted y-values.
=GROWTH(B1:B10, A1:A10, A11:A15) — Predicts y-values for x=A11:A15 based on exponential fit of existing dataPro Tip: GROWTH assumes y = b * m^x. It is the exponential equivalent of TREND (which assumes linear). Use GROWTH for population growth, compound returns, or any exponentially increasing data.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=TREND(known_y's, [known_x's], [new_x's], [const])
Returns values along a linear trend by fitting a straight line to known data points using least squares.
=TREND(B1:B10, A1:A10, A11:A15) — Predicts y-values for x=A11:A15 based on linear fit=TREND(B1:B12, A1:A12) — Returns the fitted values for the existing dataPro Tip: TREND is the array version of FORECAST. It can predict multiple values at once and handles multiple regression (multiple x columns). Use GROWTH for exponential trends.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=SKEW(number1, [number2], ...)
Returns the skewness of a distribution, indicating asymmetry of the data around its mean.
=SKEW(A1:A100) — Returns the skewness of the datasetPro Tip: Positive skew means the tail extends right (e.g., income data). Negative skew means the tail extends left. A skewness near 0 indicates a roughly symmetric distribution.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=KURT(number1, [number2], ...)
Returns the kurtosis of a dataset, indicating the heaviness of the tails relative to a normal distribution.
=KURT(A1:A100) — Returns the excess kurtosis of the datasetPro Tip: Excel returns excess kurtosis (normal distribution = 0). Positive kurtosis means heavier tails (more outliers). Negative kurtosis means lighter tails. Requires at least 4 data points.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=PROB(x_range, prob_range, lower_limit, [upper_limit])
Returns the probability that values in a range are between two limits, given associated probabilities.
=PROB(A1:A5, B1:B5, 1, 3) — Returns the sum of probabilities for x values between 1 and 3=PROB(A1:A5, B1:B5, 2) — Returns the probability for x value equal to 2Pro Tip: The probabilities in prob_range must sum to 1 (or less). If upper_limit is omitted, PROB returns the probability for exactly the lower_limit value.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=TRIMMEAN(array, percent)
Returns the mean of a dataset after removing a percentage of data points from the top and bottom.
=TRIMMEAN(A1:A100, 0.1) — Returns the mean after removing the top and bottom 5% of values=TRIMMEAN(A1:A50, 0.2) — Returns the mean after removing the top and bottom 10%Pro Tip: TRIMMEAN is a robust measure of central tendency that reduces the effect of outliers. The percent is split equally between top and bottom (10% removes 5% from each end).
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=GEOMEAN(number1, [number2], ...)
Returns the geometric mean of a set of positive numbers.
=GEOMEAN(A1:A10) — Returns the geometric mean of the values=GEOMEAN(1.05, 1.10, 0.95, 1.08) — Returns ~1.044 (average growth factor)Pro Tip: GEOMEAN is the correct average for rates of return, growth rates, and ratios. It is always less than or equal to the arithmetic mean. All values must be positive.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=HARMEAN(number1, [number2], ...)
Returns the harmonic mean of a set of positive numbers.
=HARMEAN(A1:A10) — Returns the harmonic mean of the values=HARMEAN(60, 40) — Returns 48 (average speed for equal-distance trips at 60 and 40 mph)Pro Tip: The harmonic mean is the correct average for rates when the quantity in the denominator is constant (e.g., average speed for equal distances, average price-earnings ratio). All values must be positive.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=DEVSQ(number1, [number2], ...)
Returns the sum of squares of deviations of data points from their sample mean.
=DEVSQ(A1:A100) — Returns the total sum of squared deviations from the meanPro Tip: DEVSQ is the numerator used to calculate variance: VAR.S = DEVSQ/(n-1). It measures the total variability in a dataset and is used in ANOVA and regression calculations.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=AVEDEV(number1, [number2], ...)
Returns the average of the absolute deviations of data points from their mean.
=AVEDEV(A1:A100) — Returns the average absolute deviation from the mean=AVEDEV(2, 4, 8, 16) — Returns 4.5Pro Tip: AVEDEV is an alternative measure of spread that is more intuitive than standard deviation. It represents the average distance of each data point from the mean.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=Z.TEST(array, x, [sigma])
Returns the one-tailed p-value of a z-test, determining whether a sample mean differs significantly from a hypothesized mean.
=Z.TEST(A1:A50, 100) — Tests whether the mean of A1:A50 differs significantly from 100=Z.TEST(A1:A50, 100, 15) — Tests with a known population standard deviation of 15Pro Tip: Z.TEST returns the one-tailed p-value. For a two-tailed test, multiply by 2. If sigma is omitted, the sample standard deviation is used. A small p-value suggests the sample mean differs from x.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcLookup & Reference
=LOOKUP(lookup_value, lookup_vector, [result_vector])
Looks up a value in a one-row or one-column range and returns a value from the same position in a second one-row or one-column range.
=LOOKUP(999, A1:A100, B1:B100) — Finds the closest match to 999 in column A and returns the corresponding value from column B=LOOKUP(2, 1/(A1:A10<>""), A1:A10) — Returns the last non-blank value in A1:A10Pro Tip: LOOKUP always does an approximate match on sorted data (like VLOOKUP with TRUE). The classic trick LOOKUP(2,1/(criteria),result_range) finds the last matching value. XLOOKUP is the modern replacement.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcLookup & Reference
=AREAS(reference)
Returns the number of areas in a reference. An area is a contiguous range of cells or a single cell.
=AREAS(A1:C3) — Returns 1 (single contiguous range)=AREAS((A1:C3,D1:E3,F1:F5)) — Returns 3 (three separate areas)Pro Tip: AREAS is useful for validating multi-area references and in advanced formulas that handle discontinuous ranges. Note the double parentheses required when listing multiple areas.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcLookup & Reference
=HYPERLINK(link_location, [friendly_name])
Creates a clickable hyperlink to a URL, file path, or cell reference within the workbook.
=HYPERLINK("https://www.example.com", "Visit Site") — Creates a clickable link labeled Visit Site=HYPERLINK("#Sheet2!A1", "Go to Sheet2") — Creates an internal link to cell A1 on Sheet2=HYPERLINK("mailto:"&A1, A1) — Creates a clickable email link from an address in A1Pro Tip: Use # prefix for internal workbook links. HYPERLINK is dynamic -- the URL can be built from cell values, enabling auto-generated links to documents, websites, or other sheets.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcLookup & Reference
=CHOOSECOLS(array, col_num1, [col_num2], ...)
Returns the specified columns from an array or range.
=CHOOSECOLS(A1:E10, 1, 3, 5) — Returns columns 1, 3, and 5 from the range=CHOOSECOLS(A1:E10, 5, 3, 1) — Returns columns in reverse order (5, 3, 1)Pro Tip: Use negative numbers to count from the right: -1 is the last column. CHOOSECOLS can reorder columns, not just select them. Pair with CHOOSEROWS for full row-and-column selection.
Works in: Excel 365, Google SheetsLookup & Reference
=CHOOSEROWS(array, row_num1, [row_num2], ...)
Returns the specified rows from an array or range.
=CHOOSEROWS(A1:E10, 1, 5, 10) — Returns rows 1, 5, and 10 from the range=CHOOSEROWS(A1:E10, -1, -2, -3) — Returns the last 3 rows in reverse orderPro Tip: Use negative numbers to count from the bottom: -1 is the last row. CHOOSEROWS is ideal for extracting specific rows from sorted or filtered results without helper columns.
Works in: Excel 365, Google SheetsLookup & Reference
=DROP(array, rows, [columns])
Removes a specified number of rows and/or columns from the start or end of an array.
=DROP(A1:E10, 2) — Drops the first 2 rows, returning rows 3-10=DROP(A1:E10, -1, -1) — Drops the last row and last column=DROP(A1:E10, 0, 2) — Drops the first 2 columns, keeping all rowsPro Tip: Positive numbers drop from the top/left, negative from the bottom/right. Use 0 to keep all rows or columns. DROP is the complement of TAKE -- together they slice arrays flexibly.
Works in: Excel 365, Google SheetsLookup & Reference
=TAKE(array, rows, [columns])
Returns a specified number of contiguous rows and/or columns from the start or end of an array.
=TAKE(A1:E10, 3) — Returns the first 3 rows=TAKE(A1:E10, -5) — Returns the last 5 rows=TAKE(A1:E10, 3, 2) — Returns the first 3 rows and first 2 columnsPro Tip: Positive numbers take from the top/left, negative from the bottom/right. TAKE is the complement of DROP. Combine them: TAKE gets a subset, DROP removes unwanted parts.
Works in: Excel 365, Google SheetsLookup & Reference
=WRAPCOLS(vector, wrap_count, [pad_with])
Wraps a one-dimensional array into a 2D array by filling columns first, with a specified number of rows per column.
=WRAPCOLS(A1:A12, 4) — Converts 12 values into a 4-row by 3-column array, filling down each column=WRAPCOLS(A1:A10, 3, "-") — Wraps into 3 rows per column, padding incomplete columns with dashesPro Tip: WRAPCOLS fills down columns first (column-major order), while WRAPROWS fills across rows first (row-major order). Use the pad_with argument to handle remainders cleanly.
Works in: Excel 365, Google SheetsLookup & Reference
=VSTACK(array1, [array2], ...)
Vertically stacks (appends) arrays on top of each other into a single array.
=VSTACK(A1:C3, A5:C7) — Stacks two 3-row ranges into a single 6-row range=VSTACK({"Header1","Header2"}, A1:B10) — Adds a header row on top of dataPro Tip: VSTACK is perfect for combining data from multiple tables vertically (like SQL UNION ALL). If arrays have different column counts, narrower arrays are padded with #N/A. Use IFNA to handle padding.
Works in: Excel 365, Google SheetsLookup & Reference
=HSTACK(array1, [array2], ...)
Horizontally stacks (appends) arrays side by side into a single array.
=HSTACK(A1:A10, B1:B10, D1:D10) — Combines three columns side by side, skipping column C=HSTACK(A1:C10, SEQUENCE(10)) — Appends a row-number column to existing dataPro Tip: HSTACK is like placing arrays side by side. If arrays have different row counts, shorter arrays are padded with #N/A. Combine with VSTACK for full 2D array assembly.
Works in: Excel 365, Google SheetsLookup & Reference
=EXPAND(array, rows, [columns], [pad_with])
Expands or pads an array to specified row and column dimensions.
=EXPAND(A1:B3, 5, 4, 0) — Expands a 3x2 array to 5x4, filling new cells with 0=EXPAND(A1:C1, 1, 5, "") — Expands a 3-column row to 5 columns, padding with empty stringsPro Tip: EXPAND only adds rows/columns -- it cannot shrink an array. Use it to normalize different-sized arrays to the same dimensions before combining them, or to add padding around data.
Works in: Excel 365, Google SheetsLogical
=SCAN(initial_value, array, lambda)
Scans an array by applying a LAMBDA function to each element and returns an array of intermediate accumulated values.
=SCAN(0, A1:A10, LAMBDA(acc, x, acc + x)) — Returns a running total (cumulative sum) of values in A1:A10=SCAN(1, A1:A5, LAMBDA(acc, x, acc * x)) — Returns running productsPro Tip: SCAN is like REDUCE but returns all intermediate results instead of just the final value. It is ideal for cumulative sums, running averages, and sequential calculations without helper columns.
Works in: Excel 365, Google SheetsLogical
=MAKEARRAY(rows, cols, lambda)
Creates an array of specified dimensions by applying a LAMBDA function to each row and column index.
=MAKEARRAY(5, 5, LAMBDA(r, c, r * c)) — Creates a 5x5 multiplication table=MAKEARRAY(3, 4, LAMBDA(r, c, r + c - 1)) — Creates a 3x4 array with sequential-like valuesPro Tip: MAKEARRAY is the most flexible array generator. The LAMBDA receives the row index and column index (both 1-based). Use it to create custom matrices, lookup tables, or pattern-based arrays.
Works in: Excel 365, Google SheetsLogical
=BYCOL(array, lambda)
Applies a LAMBDA function to each column of an array and returns a single-row result.
=BYCOL(A1:D10, LAMBDA(col, AVERAGE(col))) — Returns the average of each column as a single row=BYCOL(A1:D10, LAMBDA(col, MAX(col)-MIN(col))) — Returns the range (max-min) for each columnPro Tip: BYCOL is the column-wise counterpart to BYROW. The LAMBDA receives each column as a one-column array. Use it for column-level aggregations that return a summary row.
Works in: Excel 365, Google SheetsLogical
=ISOMITTED(argument)
Checks whether an argument in a LAMBDA function was omitted (not provided by the caller).
=LAMBDA(x, [y], IF(ISOMITTED(y), x*2, x*y))(5) — Returns 10 because y is omitted, so it defaults to doubling x=LAMBDA(a, [b], IF(ISOMITTED(b), a, a+b)) — Creates a function that handles optional parametersPro Tip: ISOMITTED only works inside LAMBDA functions with optional parameters (marked with square brackets). Use it to create flexible reusable functions with sensible defaults.
Works in: Excel 365Date & Time
=NETWORKDAYS.INTL(start_date, end_date, [weekend], [holidays])
Returns the number of working days between two dates, with custom weekend parameters for international use.
=NETWORKDAYS.INTL(A1, B1, 7) — Working days where only Friday is the weekend (code 7)=NETWORKDAYS.INTL(A1, B1, "0000011", C1:C10) — Custom weekend string: 0=workday, 1=weekend (Saturday and Sunday off)Pro Tip: The weekend argument accepts codes (1-17) or a 7-character binary string where each digit represents Mon-Sun (1=weekend, 0=workday). This handles any international work-week pattern.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcDate & Time
=WORKDAY.INTL(start_date, days, [weekend], [holidays])
Returns a date that is a specified number of working days before or after a start date, with custom weekend parameters.
=WORKDAY.INTL(A1, 20, 7) — Date 20 working days later where only Friday is the weekend=WORKDAY.INTL(TODAY(), 10, "0000011", Holidays) — 10 working days from today with custom weekends and a holiday listPro Tip: Like NETWORKDAYS.INTL, use weekend codes or a 7-character string for flexibility. Negative days count backward. Essential for project scheduling in regions with non-standard work weeks.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcDate & Time
=YEARFRAC(start_date, end_date, [basis])
Returns the fraction of the year represented by the number of whole days between two dates.
=YEARFRAC(A1, B1) — Returns the fraction of a year between two dates (US 30/360 basis)=YEARFRAC(A1, B1, 1) — Year fraction using actual/actual day count basisPro Tip: The basis argument controls the day count convention: 0=US 30/360, 1=actual/actual, 2=actual/360, 3=actual/365, 4=European 30/360. Critical for financial calculations like bond pricing.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcDate & Time
=DAYS360(start_date, end_date, [method])
Returns the number of days between two dates based on a 360-day year (twelve 30-day months), used in financial calculations.
=DAYS360(A1, B1) — Days between dates using US (NASD) method=DAYS360(A1, B1, TRUE) — Days between dates using European methodPro Tip: The 360-day year simplifies interest calculations. US method (FALSE/default) and European method (TRUE) differ in how they handle month-end dates. Used in bond pricing and loan calculations.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcFinancial
=XNPV(rate, values, dates)
Returns the net present value for a schedule of cash flows that are not necessarily periodic.
=XNPV(10%, B1:B10, A1:A10) — NPV at 10% for irregular cash flows in B with corresponding dates in APro Tip: Unlike NPV which assumes equal periods, XNPV uses actual dates for precise discounting. The first value is typically the initial investment (negative) and its date is the basis for discounting.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcFinancial
=XIRR(values, dates, [guess])
Returns the internal rate of return for a schedule of cash flows that are not necessarily periodic.
=XIRR(B1:B10, A1:A10) — IRR for irregular cash flows with actual dates=XIRR(B1:B10, A1:A10, 0.1) — IRR with an initial guess of 10%Pro Tip: XIRR uses an iterative algorithm. If it does not converge, provide a guess closer to the expected rate. Values must contain at least one positive and one negative number. The result is annualized.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcFinancial
=MIRR(values, finance_rate, reinvest_rate)
Returns the modified internal rate of return, accounting for different borrowing and reinvestment rates.
=MIRR(B1:B10, 8%, 5%) — MIRR with 8% cost of capital and 5% reinvestment ratePro Tip: MIRR is more realistic than IRR because it does not assume cash flows are reinvested at the IRR itself. It uses the finance_rate for negative flows and reinvest_rate for positive flows.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcFinancial
=DDB(cost, salvage, life, period, [factor])
Returns the depreciation of an asset using the double-declining balance method or another specified factor.
=DDB(10000, 1000, 5, 1) — Year 1 depreciation on a $10,000 asset with $1,000 salvage over 5 years=DDB(10000, 1000, 5, 3, 1.5) — Year 3 depreciation using 150% declining balancePro Tip: The default factor is 2 (double-declining). Change the factor for other accelerated methods (1.5 for 150% declining balance). DDB never depreciates below salvage value.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcFinancial
=DB(cost, salvage, life, period, [month])
Returns the depreciation of an asset using the fixed-declining balance method.
=DB(10000, 1000, 5, 1) — Year 1 depreciation using fixed-declining balance=DB(10000, 1000, 5, 1, 6) — Year 1 depreciation starting mid-year (6 months)Pro Tip: DB calculates a fixed depreciation rate based on cost, salvage, and life. The optional month argument handles partial first years. Use SLN for straight-line or DDB for double-declining.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcFinancial
=CUMIPMT(rate, nper, pv, start_period, end_period, type)
Returns the cumulative interest paid on a loan between two periods.
=CUMIPMT(5%/12, 360, 250000, 1, 12, 0) — Total interest paid in the first year of a $250K mortgage at 5%=CUMIPMT(5%/12, 360, 250000, 1, 360, 0) — Total interest paid over the entire life of the loanPro Tip: Type 0 means payments at end of period, 1 means beginning. The result is negative (outgoing cash). CUMIPMT is essential for analyzing total interest cost over specific loan periods.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcFinancial
=CUMPRINC(rate, nper, pv, start_period, end_period, type)
Returns the cumulative principal paid on a loan between two periods.
=CUMPRINC(5%/12, 360, 250000, 1, 12, 0) — Total principal paid in the first year of a $250K mortgage at 5%=CUMPRINC(5%/12, 360, 250000, 13, 24, 0) — Principal paid during the second yearPro Tip: Compare CUMPRINC across periods to see how principal repayment accelerates over time. Add CUMIPMT + CUMPRINC for any period range to verify it equals the sum of PMT payments.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcFinancial
=PRICE(settlement, maturity, rate, yld, redemption, frequency, [basis])
Returns the price per $100 face value of a bond that pays periodic interest.
=PRICE("2024-01-15", "2034-01-15", 5%, 6%, 100, 2) — Price of a 5% coupon bond yielding 6%, semi-annual payments, 10-year maturityPro Tip: Settlement is the purchase date, maturity is the end date. Rate is the annual coupon rate, yld is the market yield. Frequency: 1=annual, 2=semi-annual, 4=quarterly. Basis controls day count convention.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcFinancial
=YIELD(settlement, maturity, rate, pr, redemption, frequency, [basis])
Returns the yield on a bond that pays periodic interest.
=YIELD("2024-01-15", "2034-01-15", 5%, 95, 100, 2) — Yield of a 5% coupon bond purchased at 95 per 100 face value, semi-annualPro Tip: YIELD calculates the yield-to-maturity (YTM) -- the total return if held to maturity. When price < 100, yield > coupon rate (discount bond). When price > 100, yield < coupon rate (premium bond).
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcFinancial
=ACCRINT(issue, first_interest, settlement, rate, par, frequency, [basis], [calc_method])
Returns the accrued interest for a bond that pays periodic interest.
=ACCRINT("2024-01-01", "2024-07-01", "2024-04-01", 5%, 1000, 2) — Accrued interest on a $1,000 bond with 5% coupon from issue to settlementPro Tip: Accrued interest is what the buyer pays the seller for interest earned but not yet paid. It is added to the clean price to get the dirty (full) price the buyer actually pays.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcFinancial
=DISC(settlement, maturity, pr, redemption, [basis])
Returns the discount rate for a security.
=DISC("2024-01-15", "2024-07-15", 98, 100) — Discount rate for a security bought at 98 and redeemed at 100Pro Tip: DISC calculates the bank discount rate, which is different from yield. It is commonly used for Treasury bills and commercial paper. Use YIELDDISC for the equivalent yield.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcFinancial
=DOLLARDE(fractional_dollar, fraction)
Converts a dollar price expressed as a fraction into a decimal number.
=DOLLARDE(1.02, 16) — Converts 1 and 2/16 to 1.125=DOLLARDE(100.1, 8) — Converts 100 and 1/8 to 100.125Pro Tip: Bond prices are often quoted in fractions (32nds for Treasury bonds, 8ths for stocks). DOLLARDE converts these fractional quotes to decimals for calculations.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcFinancial
=DOLLARFR(decimal_dollar, fraction)
Converts a dollar price expressed as a decimal into a fractional representation.
=DOLLARFR(1.125, 16) — Converts 1.125 to 1.02 (1 and 2/16)=DOLLARFR(100.125, 8) — Converts 100.125 to 100.1 (100 and 1/8)Pro Tip: DOLLARFR is the inverse of DOLLARDE. Use it to convert calculated decimal bond prices back to the fractional format used in bond trading.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcFinancial
=DURATION(settlement, maturity, coupon, yld, frequency, [basis])
Returns the Macaulay duration of a bond, measuring the weighted average time to receive cash flows.
=DURATION("2024-01-15", "2034-01-15", 5%, 6%, 2) — Duration of a 10-year bond with 5% coupon yielding 6%, semi-annualPro Tip: Duration measures interest rate sensitivity: a duration of 7 means the bond price changes about 7% for each 1% change in yield. Higher duration means more interest rate risk. See MDURATION for modified duration.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcFinancial
=MDURATION(settlement, maturity, coupon, yld, frequency, [basis])
Returns the modified Macaulay duration of a bond, a more direct measure of price sensitivity to yield changes.
=MDURATION("2024-01-15", "2034-01-15", 5%, 6%, 2) — Modified duration of a 10-year bond with 5% coupon yielding 6%Pro Tip: Modified duration = Macaulay duration / (1 + yield/frequency). It directly estimates the percentage price change for a 1% yield change: Price change % is approximately -MDURATION * yield change.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcFinancial
=RECEIVED(settlement, maturity, investment, discount, [basis])
Returns the amount received at maturity for a fully invested security (zero-coupon or discount instrument).
=RECEIVED("2024-01-15", "2024-07-15", 100000, 5%) — Amount received at maturity for $100,000 invested at 5% discountPro Tip: RECEIVED calculates the maturity value based on the discount rate and holding period. It is used for discount securities like Treasury bills and commercial paper.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcFinancial
=INTRATE(settlement, maturity, investment, redemption, [basis])
Returns the interest rate for a fully invested security.
=INTRATE("2024-01-15", "2024-07-15", 98000, 100000) — Interest rate for a security bought at $98,000 and redeemed at $100,000Pro Tip: INTRATE calculates the simple interest rate, not the compound rate. It is the inverse of RECEIVED. Use it for money market instruments, Treasury bills, and short-term discount securities.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcFinancial
=TBILLEQ(settlement, maturity, discount)
Returns the bond-equivalent yield for a Treasury bill.
=TBILLEQ("2024-01-15", "2024-07-15", 5%) — Bond-equivalent yield for a T-bill with 5% discount ratePro Tip: T-bills are quoted on a discount basis, but bond-equivalent yield allows comparison with coupon bonds. The bond-equivalent yield is always higher than the discount rate.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcFinancial
=TBILLPRICE(settlement, maturity, discount)
Returns the price per $100 face value for a Treasury bill.
=TBILLPRICE("2024-01-15", "2024-07-15", 5%) — Price per $100 for a T-bill with 5% discount ratePro Tip: T-bill price = 100 - (discount * days_to_maturity / 360). The difference between price and 100 is the investor's return. Use TBILLYIELD to convert back to yield.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcFinancial
=TBILLYIELD(settlement, maturity, pr)
Returns the yield for a Treasury bill based on its price.
=TBILLYIELD("2024-01-15", "2024-07-15", 97.5) — Yield for a T-bill purchased at $97.50 per $100 face valuePro Tip: TBILLYIELD returns the bank discount yield (not bond-equivalent yield). For comparison with bonds, use TBILLEQ instead. The yield increases as the price decreases.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcFinancial
=FVSCHEDULE(principal, schedule)
Returns the future value of an initial principal after applying a series of compound interest rates.
=FVSCHEDULE(10000, {0.05, 0.06, 0.04}) — Future value of $10,000 after 3 years at 5%, 6%, and 4% interest rates=FVSCHEDULE(10000, A1:A10) — Future value using variable annual rates from a rangePro Tip: FVSCHEDULE handles variable interest rates that change each period, unlike FV which assumes a constant rate. Useful for projected returns with changing market conditions or stepped rate loans.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcFinancial
=ODDFPRICE(settlement, maturity, issue, first_coupon, rate, yld, redemption, frequency, [basis])
Returns the price per $100 face value of a bond with an odd (irregular) first period.
=ODDFPRICE("2024-03-15", "2034-01-15", "2024-01-15", "2024-07-15", 5%, 6%, 100, 2) — Price of a bond with a short first coupon periodPro Tip: Bonds sometimes have a first coupon period that is shorter or longer than normal. ODDFPRICE adjusts the pricing calculation for this irregularity. Use when settlement falls between issue and first coupon.
Works in: Excel 365, Excel 2021, Excel 2019Financial
=ODDLPRICE(settlement, maturity, last_interest, rate, yld, redemption, frequency, [basis])
Returns the price per $100 face value of a bond with an odd (irregular) last period.
=ODDLPRICE("2024-01-15", "2034-04-15", "2034-01-15", 5%, 6%, 100, 2) — Price of a bond with an irregular last coupon periodPro Tip: Bonds may have a final coupon period that differs from the standard interval. ODDLPRICE adjusts for this. It is the counterpart to ODDFPRICE for the last period irregularity.
Works in: Excel 365, Excel 2021, Excel 2019Information
=ISERR(value)
Returns TRUE if the value is any error except #N/A.
=ISERR(A1) — Returns TRUE if A1 contains #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME?, or #NULL!=IF(ISERR(A1/B1), 0, A1/B1) — Returns 0 for division errors but allows #N/A to pass throughPro Tip: ISERR catches all errors except #N/A. This is useful when you want #N/A to propagate (e.g., indicating missing data from a VLOOKUP) while handling other errors separately.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcInformation
=ISLOGICAL(value)
Returns TRUE if the value is a logical value (TRUE or FALSE).
=ISLOGICAL(TRUE) — Returns TRUE=ISLOGICAL(A1>10) — Returns TRUE (comparisons return logical values)=ISLOGICAL("TRUE") — Returns FALSE (text string, not a logical value)Pro Tip: ISLOGICAL distinguishes between actual Boolean TRUE/FALSE and the text strings "TRUE"/"FALSE". Use it to validate data types in cells that should contain checkboxes or Boolean flags.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcInformation
=ISEVEN(number)
Returns TRUE if the number is even.
=ISEVEN(4) — Returns TRUE=ISEVEN(3) — Returns FALSE=ISEVEN(A1) — Checks if the value in A1 is evenPro Tip: ISEVEN truncates decimals before checking: ISEVEN(4.7) returns TRUE. Use it in conditional formatting for alternating row colors or to validate even-numbered inputs.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcInformation
=ISODD(number)
Returns TRUE if the number is odd.
=ISODD(3) — Returns TRUE=ISODD(4) — Returns FALSE=ISODD(ROW()) — Returns TRUE for odd-numbered rowsPro Tip: Like ISEVEN, ISODD truncates decimals first. Combine with ROW() for alternating row logic, or use in data validation to ensure odd-numbered entries.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcInformation
=ISREF(value)
Returns TRUE if the value is a cell reference.
=ISREF(A1) — Returns TRUE=ISREF(INDIRECT(A1)) — Returns TRUE if INDIRECT successfully creates a valid reference=ISREF(42) — Returns FALSE (a number, not a reference)Pro Tip: ISREF is useful for validating that INDIRECT or other reference-building functions return valid references before using them. It helps prevent #REF! errors in dynamic formulas.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcInformation
=N(value)
Converts a value to a number. TRUE becomes 1, FALSE becomes 0, dates become serial numbers, errors remain errors, text becomes 0.
=N(TRUE) — Returns 1=N(FALSE) — Returns 0=N("hello") — Returns 0 (text converts to 0)Pro Tip: N is rarely needed in modern Excel since most functions convert automatically. Its main modern use is adding invisible comments to formulas: =SUM(A1:A10)+N("This sums the revenue column") -- the N() part evaluates to 0.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcInformation
=NA()
Returns the #N/A error value, indicating that a value is not available.
=NA() — Returns #N/A=IF(A1="", NA(), A1) — Returns #N/A for blank cells instead of empty stringPro Tip: Use NA() to explicitly mark cells as missing data. Charts will show gaps for #N/A values instead of plotting zero. This is preferred over leaving cells blank or entering 0 for missing data.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcInformation
=ERROR.TYPE(error_val)
Returns a number corresponding to the type of error: 1=#NULL!, 2=#DIV/0!, 3=#VALUE!, 4=#REF!, 5=#NAME?, 6=#NUM!, 7=#N/A, 8=#GETTING_DATA.
=ERROR.TYPE(A1) — Returns the error type number if A1 contains an error=IF(ERROR.TYPE(A1)=2, "Division by zero", "Other error") — Identifies #DIV/0! errors specificallyPro Tip: ERROR.TYPE returns #N/A if the value is not an error. Use it with SWITCH or CHOOSE to display custom error messages based on the specific error type encountered.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcInformation
=INFO(type_text)
Returns information about the current operating environment.
=INFO("osversion") — Returns the operating system version=INFO("directory") — Returns the current directory path=INFO("release") — Returns the Excel version numberPro Tip: Valid type_text values include: directory, numfile, origin, osversion, recalc, release, system. INFO is useful for documenting the environment in which a workbook was created or last saved.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcInformation
=SHEET([value])
Returns the sheet number of a referenced sheet or the current sheet.
=SHEET() — Returns the sheet number of the current sheet=SHEET(Sheet3!A1) — Returns the sheet number of Sheet3Pro Tip: SHEET returns the position of the sheet in the workbook tab order. If a sheet is moved, its number changes. Use it for dynamic formulas that need to know which sheet they are on.
Works in: Excel 365, Excel 2021, Excel 2019, Google SheetsInformation
=SHEETS([reference])
Returns the number of sheets in a reference or the total number of sheets in the workbook.
=SHEETS() — Returns the total number of sheets in the workbook=SHEETS(Sheet1:Sheet5!A1) — Returns 5 (the number of sheets in the 3D reference)Pro Tip: Without arguments, SHEETS counts all sheets including hidden ones. Use it to create dynamic formulas that adapt when sheets are added or removed from the workbook.
Works in: Excel 365, Excel 2021, Excel 2019, Google SheetsDatabase
=DSUM(database, field, criteria)
Adds the numbers in a field (column) of records in a database that match conditions you specify.
=DSUM(A1:F100, "Sales", H1:H2) — Sums the Sales column for records matching criteria in H1:H2=DSUM(A1:F100, 3, H1:I2) — Sums values in the 3rd column for records matching multiple criteriaPro Tip: The criteria range must include column headers that exactly match the database headers. Use a separate area of your worksheet for the criteria range to avoid confusion.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcDatabase
=DAVERAGE(database, field, criteria)
Averages the values in a field (column) of records in a database that match conditions you specify.
=DAVERAGE(A1:F100, "Score", H1:H2) — Averages the Score column for records matching criteria in H1:H2Pro Tip: DAVERAGE ignores blank cells in the field column. If no records match the criteria, it returns a #DIV/0! error.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcDatabase
=DCOUNT(database, field, criteria)
Counts the cells that contain numbers in a field (column) of records in a database that match conditions you specify.
=DCOUNT(A1:F100, "Amount", H1:H2) — Counts numeric entries in the Amount column for matching recordsPro Tip: DCOUNT only counts cells containing numbers. Use DCOUNTA to count non-blank cells including text. Leave the field argument blank to count all matching records.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcDatabase
=DCOUNTA(database, field, criteria)
Counts the non-blank cells in a field (column) of records in a database that match conditions you specify.
=DCOUNTA(A1:F100, "Status", H1:H2) — Counts non-blank Status entries for matching recordsPro Tip: Unlike DCOUNT, DCOUNTA counts cells with text, numbers, errors, and logical values — everything except blank cells.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcDatabase
=DMAX(database, field, criteria)
Returns the largest number in a field (column) of records in a database that match conditions you specify.
=DMAX(A1:F100, "Revenue", H1:H2) — Returns the maximum Revenue for records matching criteriaPro Tip: Combine DMAX and DMIN to quickly find the range of values within a filtered subset of your data.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcDatabase
=DMIN(database, field, criteria)
Returns the smallest number in a field (column) of records in a database that match conditions you specify.
=DMIN(A1:F100, "Price", H1:H2) — Returns the minimum Price for records matching criteriaPro Tip: DMIN only considers numeric values. Text and blank cells are ignored when determining the minimum.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcDatabase
=DGET(database, field, criteria)
Extracts a single value from a field (column) of a record in a database that matches conditions you specify.
=DGET(A1:F100, "Email", H1:H2) — Returns the Email value for the single record matching criteriaPro Tip: DGET returns #VALUE! if no records match and #NUM! if more than one record matches. Make sure your criteria uniquely identify one record.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcDatabase
=DPRODUCT(database, field, criteria)
Multiplies the values in a field (column) of records in a database that match conditions you specify.
=DPRODUCT(A1:F100, "Factor", H1:H2) — Multiplies all Factor values for records matching criteriaPro Tip: DPRODUCT is useful for compound growth calculations or combining multiplicative factors across filtered records.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcDatabase
=DSTDEV(database, field, criteria)
Estimates the standard deviation of a population based on a sample, using the numbers in a field of records that match criteria.
=DSTDEV(A1:F100, "Score", H1:H2) — Returns the sample standard deviation of Scores for matching recordsPro Tip: DSTDEV uses n-1 in the denominator (sample). Use DSTDEVP if your data represents the entire population.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcDatabase
=DSTDEVP(database, field, criteria)
Calculates the standard deviation of a population based on the entire population, using numbers in a field of records that match criteria.
=DSTDEVP(A1:F100, "Score", H1:H2) — Returns the population standard deviation of Scores for matching recordsPro Tip: DSTDEVP uses n in the denominator (population). Use DSTDEV if your data is a sample from a larger population.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcDatabase
=DVAR(database, field, criteria)
Estimates the variance of a population based on a sample, using the numbers in a field of records that match criteria.
=DVAR(A1:F100, "Score", H1:H2) — Returns the sample variance of Scores for matching recordsPro Tip: Variance is the square of standard deviation. DVAR uses n-1 (sample); use DVARP for the entire population.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcDatabase
=DVARP(database, field, criteria)
Calculates the variance of a population based on the entire population, using numbers in a field of records that match criteria.
=DVARP(A1:F100, "Score", H1:H2) — Returns the population variance of Scores for matching recordsPro Tip: DVARP uses n in the denominator. If your matching records are just a sample, use DVAR instead for an unbiased estimate.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=CONVERT(number, from_unit, to_unit)
Converts a number from one measurement system to another (e.g., inches to centimeters, pounds to kilograms).
=CONVERT(68, "F", "C") — Converts 68 degrees Fahrenheit to Celsius (returns 20)=CONVERT(1, "lbm", "kg") — Converts 1 pound to kilogramsPro Tip: CONVERT supports over 100 unit strings across weight, distance, time, pressure, force, energy, temperature, and more. Unit strings are case-sensitive.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=DELTA(number1, [number2])
Tests whether two values are equal. Returns 1 if they are equal, 0 otherwise. Also known as the Kronecker delta function.
=DELTA(5, 5) — Returns 1 because both values are equal=DELTA(5, 4) — Returns 0 because the values differPro Tip: If number2 is omitted, it defaults to 0. DELTA is useful with SUMPRODUCT to count exact matches in engineering calculations.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=GESTEP(number, [step])
Tests whether a number is greater than or equal to a threshold (step) value. Returns 1 if number >= step, 0 otherwise.
=GESTEP(5, 4) — Returns 1 because 5 >= 4=GESTEP(3, 4) — Returns 0 because 3 < 4Pro Tip: If step is omitted, it defaults to 0, effectively testing whether the number is non-negative. Useful for step functions in engineering models.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=BIN2DEC(number)
Converts a binary (base-2) number to decimal (base-10).
=BIN2DEC("1100100") — Converts binary 1100100 to decimal 100=BIN2DEC(1010) — Converts binary 1010 to decimal 10Pro Tip: The binary number can be up to 10 characters (bits). The most significant bit is the sign bit, so 1111111111 = -1 in two's complement.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=BIN2HEX(number, [places])
Converts a binary (base-2) number to hexadecimal (base-16).
=BIN2HEX("11111011", 4) — Converts binary 11111011 to hex FB padded to 4 charactersPro Tip: The places argument specifies the minimum number of characters. Leading zeros are added if needed. The binary input can be up to 10 bits.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=BIN2OCT(number, [places])
Converts a binary (base-2) number to octal (base-8).
=BIN2OCT("1001", 3) — Converts binary 1001 to octal 011Pro Tip: The octal result can be padded with leading zeros using the places argument. Useful for Unix file permission conversions.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=DEC2BIN(number, [places])
Converts a decimal (base-10) number to binary (base-2).
=DEC2BIN(9, 4) — Returns 1001 (decimal 9 in 4-bit binary)=DEC2BIN(100) — Returns 1100100Pro Tip: DEC2BIN handles values from -512 to 511. For larger numbers, use a combination of DEC2HEX and manual conversion.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=DEC2HEX(number, [places])
Converts a decimal (base-10) number to hexadecimal (base-16).
=DEC2HEX(255, 4) — Returns 00FF (decimal 255 as 4-character hex)=DEC2HEX(100) — Returns 64Pro Tip: DEC2HEX handles values from -549,755,813,888 to 549,755,813,887. Combine with UPPER/LOWER for consistent casing.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=DEC2OCT(number, [places])
Converts a decimal (base-10) number to octal (base-8).
=DEC2OCT(8) — Returns 10 (decimal 8 is octal 10)=DEC2OCT(100, 4) — Returns 0144Pro Tip: DEC2OCT handles values from -536,870,912 to 536,870,911. Useful for computing Unix file permissions.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=HEX2BIN(number, [places])
Converts a hexadecimal (base-16) number to binary (base-2).
=HEX2BIN("F", 8) — Returns 00001111 (hex F as 8-bit binary)Pro Tip: HEX2BIN only handles hex values up to 1FF (511 decimal) or negative values from FFFFFFFE00. For larger values, convert through decimal first.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=HEX2DEC(number)
Converts a hexadecimal (base-16) number to decimal (base-10).
=HEX2DEC("FF") — Returns 255=HEX2DEC("A5") — Returns 165Pro Tip: HEX2DEC handles up to 10 hex characters. Hex strings are case-insensitive: FF and ff both return 255.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=HEX2OCT(number, [places])
Converts a hexadecimal (base-16) number to octal (base-8).
=HEX2OCT("F", 3) — Returns 017 (hex F as 3-character octal)Pro Tip: HEX2OCT handles hex values up to 1FFFFFFF (positive) or from FFE0000000 (negative). Use places to control leading zeros.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=OCT2BIN(number, [places])
Converts an octal (base-8) number to binary (base-2).
=OCT2BIN("7", 4) — Returns 0111 (octal 7 as 4-bit binary)Pro Tip: OCT2BIN only handles octal values from 7777777000 to 777 (i.e., -512 to 511 decimal). For larger values, convert through decimal.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=OCT2DEC(number)
Converts an octal (base-8) number to decimal (base-10).
=OCT2DEC("144") — Returns 100 (octal 144 = decimal 100)Pro Tip: OCT2DEC handles up to 10 octal characters. The most significant bit is the sign bit for two's complement representation.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=OCT2HEX(number, [places])
Converts an octal (base-8) number to hexadecimal (base-16).
=OCT2HEX("77", 4) — Returns 003F (octal 77 as 4-character hex)Pro Tip: OCT2HEX handles up to 10-digit octal numbers. The result can be padded with leading zeros using the places argument.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=COMPLEX(real_num, i_num, [suffix])
Converts real and imaginary coefficients into a complex number of the form x + yi or x + yj.
=COMPLEX(3, 4) — Returns "3+4i"=COMPLEX(3, 4, "j") — Returns "3+4j" using j as the imaginary suffixPro Tip: Use the optional suffix argument to switch between 'i' (default, math convention) and 'j' (electrical engineering convention).
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=IMABS(inumber)
Returns the absolute value (modulus) of a complex number in x + yi text format.
=IMABS("3+4i") — Returns 5 (the modulus of 3+4i is sqrt(9+16))Pro Tip: IMABS calculates sqrt(x^2 + y^2). It is the distance from the origin to the point (x, y) in the complex plane.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=IMAGINARY(inumber)
Returns the imaginary coefficient of a complex number in x + yi text format.
=IMAGINARY("3+4i") — Returns 4 (the imaginary part)Pro Tip: If you pass a real number with no imaginary part, IMAGINARY returns 0. The input must be a text string in complex number format.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=IMREAL(inumber)
Returns the real coefficient of a complex number in x + yi text format.
=IMREAL("3+4i") — Returns 3 (the real part)Pro Tip: IMREAL extracts the x from x+yi. If the complex number has no real part (e.g., '4i'), it returns 0.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=BITAND(number1, number2)
Returns the bitwise AND of two integers.
=BITAND(13, 25) — Returns 9 (binary: 01101 AND 11001 = 01001)Pro Tip: Both arguments must be non-negative integers and the result cannot exceed 2^48 - 1. Useful for masking specific bits in flag fields.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=BITOR(number1, number2)
Returns the bitwise OR of two integers.
=BITOR(23, 10) — Returns 31 (binary: 10111 OR 01010 = 11111)Pro Tip: Use BITOR to combine flags or set specific bits. Both arguments must be non-negative integers up to 2^48 - 1.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=BITXOR(number1, number2)
Returns the bitwise XOR (exclusive OR) of two integers.
=BITXOR(5, 3) — Returns 6 (binary: 101 XOR 011 = 110)Pro Tip: XOR returns 1 for each bit position where the two inputs differ. Useful for toggling flags and simple checksums.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=BITLSHIFT(number, shift_amount)
Returns the number shifted left by the specified number of bits, equivalent to multiplying by 2^shift_amount.
=BITLSHIFT(4, 2) — Returns 16 (binary 100 shifted left 2 = 10000)Pro Tip: Left-shifting by n bits is equivalent to multiplying by 2^n. The number must be non-negative and the result cannot exceed 2^48 - 1.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=BITRSHIFT(number, shift_amount)
Returns the number shifted right by the specified number of bits, equivalent to integer division by 2^shift_amount.
=BITRSHIFT(13, 2) — Returns 3 (binary 1101 shifted right 2 = 11)Pro Tip: Right-shifting by n bits is equivalent to integer division by 2^n. Bits shifted out on the right are discarded.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=ERF(lower_limit, [upper_limit])
Returns the error function integrated between lower_limit and upper_limit.
=ERF(1) — Returns 0.8427... (the error function evaluated from 0 to 1)=ERF(0, 1.5) — Returns 0.9661... (error function from 0 to 1.5)Pro Tip: If upper_limit is omitted, ERF integrates from 0 to lower_limit. ERF is widely used in probability, statistics, and heat-transfer calculations.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=ERFC(x)
Returns the complementary error function integrated between x and infinity (i.e., 1 - ERF(x)).
=ERFC(1) — Returns 0.1573... (the complement of ERF(1))Pro Tip: ERFC(x) = 1 - ERF(x). For large x values, ERFC is more numerically accurate than computing 1 - ERF(x) directly.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=BESSELI(x, n)
Returns the modified Bessel function of the first kind, In(x).
=BESSELI(1.5, 1) — Returns the modified Bessel function I1(1.5)Pro Tip: Modified Bessel functions arise in problems with cylindrical symmetry where the equation has a different sign, such as heat conduction in a cylinder.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=BESSELJ(x, n)
Returns the Bessel function of the first kind, Jn(x).
=BESSELJ(1.9, 2) — Returns the Bessel function J2(1.9)Pro Tip: Bessel functions of the first kind appear in vibration analysis, electromagnetic wave propagation, and signal processing applications.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=BESSELK(x, n)
Returns the modified Bessel function of the second kind, Kn(x).
=BESSELK(1.5, 1) — Returns the modified Bessel function K1(1.5)Pro Tip: Kn(x) decays exponentially for large x and is singular at x = 0. It often appears in radial heat flow and potential problems.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=BESSELY(x, n)
Returns the Bessel function of the second kind, Yn(x).
=BESSELY(2.5, 1) — Returns the Bessel function Y1(2.5)Pro Tip: Yn(x) is also called the Neumann function. It is singular at x = 0 and is used alongside Jn(x) to form general solutions to Bessel's equation.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcWeb
=ENCODEURL(text)
Returns a URL-encoded string, replacing special characters with their percent-encoded equivalents.
=ENCODEURL("Hello World") — Returns "Hello%20World"=ENCODEURL("price=10&qty=5") — Returns "price%3D10%26qty%3D5"Pro Tip: Use ENCODEURL to safely build query strings for WEBSERVICE calls. It encodes spaces, ampersands, equals signs, and other special URL characters.
Works in: Excel 365, Excel 2021, Excel 2019Web
=FILTERXML(xml, xpath)
Returns specific data from XML content by using the specified XPath expression.
=FILTERXML(A1, "//price") — Extracts the value of the <price> element from XML in cell A1Pro Tip: Combine with WEBSERVICE to fetch XML data from a URL and then extract specific values. XPath expressions are case-sensitive.
Works in: Excel 365, Excel 2021, Excel 2019Web
=WEBSERVICE(url)
Returns data from a web service on the internet or intranet. The URL must return text-based data (XML, JSON, HTML, or plain text).
=WEBSERVICE("https://api.example.com/data") — Fetches text data from the specified URLPro Tip: WEBSERVICE only works with GET requests and returns a maximum of 32,767 characters. Combine with FILTERXML to parse XML responses or use MID/FIND for JSON.
Works in: Excel 365, Excel 2021, Excel 2019Cube
=CUBEMEMBER(connection, member_expression, [caption])
Returns a member or tuple from an OLAP cube. Use to validate that the member or tuple exists in the cube.
=CUBEMEMBER("SalesCube", "[Product].[Category].[Bikes]") — Returns the Bikes member from the Product Category hierarchyPro Tip: Use CUBEMEMBER as the foundation for other CUBE functions. The connection must be an existing OLAP data connection in the workbook.
Works in: Excel 365, Excel 2021, Excel 2019Cube
=CUBEVALUE(connection, [member_expression1], [member_expression2], ...)
Returns an aggregated value from an OLAP cube.
=CUBEVALUE("SalesCube", "[Measures].[Sales Amount]", "[Date].[Year].[2024]") — Returns the total sales amount for 2024Pro Tip: Pass multiple member expressions to slice the cube across different dimensions. You can reference CUBEMEMBER or CUBESET cells as arguments.
Works in: Excel 365, Excel 2021, Excel 2019Cube
=CUBESET(connection, set_expression, [caption], [sort_order], [sort_by])
Defines a calculated set of members or tuples from an OLAP cube by sending a set expression to the server.
=CUBESET("SalesCube", "[Product].[Category].Children") — Returns the set of all product categoriesPro Tip: Use CUBESET with CUBERANKEDMEMBER to create dynamic top-N reports from OLAP cubes without pivot tables.
Works in: Excel 365, Excel 2021, Excel 2019Cube
=CUBESETCOUNT(set)
Returns the number of items in a set defined by CUBESET.
=CUBESETCOUNT(A1) — Returns the count of members in the CUBESET defined in cell A1Pro Tip: Use CUBESETCOUNT to dynamically determine how many CUBERANKEDMEMBER formulas to use, or to validate that a set contains the expected number of items.
Works in: Excel 365, Excel 2021, Excel 2019Cube
=CUBERANKEDMEMBER(connection, set_expression, rank, [caption])
Returns the nth (ranked) member from a set. Use to return one or more elements from a set, such as the top sales performer.
=CUBERANKEDMEMBER(A1, 1) — Returns the first member from the CUBESET in cell A1Pro Tip: Combine with CUBESET (sorted by a measure) and CUBESETCOUNT to build dynamic top-N lists. Change the rank to pull different positions.
Works in: Excel 365, Excel 2021, Excel 2019Cube
=CUBEMEMBERPROPERTY(connection, member_expression, property)
Returns the value of a member property from an OLAP cube. Confirms that a member name exists and returns the specified property.
=CUBEMEMBERPROPERTY("SalesCube", "[Product].[All Products].[Bikes]", "[Product].[Color]") — Returns the Color property of the Bikes memberPro Tip: Member properties provide metadata like descriptions, keys, or custom attributes defined in the cube without needing a separate measure.
Works in: Excel 365, Excel 2021, Excel 2019Cube
=CUBEKPIMEMBER(connection, kpi_name, kpi_property, [caption])
Returns a Key Performance Indicator (KPI) name, property, and measure, and displays the name and property in the cell.
=CUBEKPIMEMBER("SalesCube", "Revenue", 1) — Returns the KPI value member for the Revenue KPI (property 1 = value)Pro Tip: KPI properties: 1 = Value, 2 = Goal, 3 = Status, 4 = Trend, 5 = Weight, 6 = Current Time Member. Use with CUBEVALUE to display the actual KPI number.
Works in: Excel 365, Excel 2021, Excel 2019Compatibility
=BETADIST(x, alpha, beta, [A], [B])
Returns the cumulative beta probability density function. Replaced by BETA.DIST in Excel 2010+.
=BETADIST(0.4, 4, 5) — Returns the cumulative beta distribution probability at x = 0.4Pro Tip: BETADIST is kept for backward compatibility. In new workbooks, use BETA.DIST with the cumulative argument set to TRUE for the same result.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcCompatibility
=BETAINV(probability, alpha, beta, [A], [B])
Returns the inverse of the cumulative beta probability density function. Replaced by BETA.INV in Excel 2010+.
=BETAINV(0.5, 4, 5) — Returns the x value at which the cumulative beta distribution equals 0.5Pro Tip: Use BETA.INV in new workbooks. BETAINV remains available for compatibility with older spreadsheets.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcCompatibility
=BINOMDIST(number_s, trials, probability_s, cumulative)
Returns the individual term binomial distribution probability. Replaced by BINOM.DIST in Excel 2010+.
=BINOMDIST(6, 10, 0.5, FALSE) — Returns the probability of exactly 6 successes in 10 trials with 50% success ratePro Tip: Use BINOM.DIST in new workbooks. Set cumulative to TRUE for the probability of at most number_s successes.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcCompatibility
=CHIDIST(x, deg_freedom)
Returns the right-tailed probability of the chi-squared distribution. Replaced by CHISQ.DIST.RT in Excel 2010+.
=CHIDIST(3.84, 1) — Returns ~0.05 (the right-tail p-value for chi-squared = 3.84 with 1 df)Pro Tip: CHIDIST returns the right-tail probability. Use CHISQ.DIST.RT in new workbooks, or CHISQ.DIST with cumulative=TRUE for the left-tail.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcCompatibility
=CHIINV(probability, deg_freedom)
Returns the inverse of the right-tailed probability of the chi-squared distribution. Replaced by CHISQ.INV.RT in Excel 2010+.
=CHIINV(0.05, 1) — Returns ~3.84 (the critical chi-squared value at 5% significance with 1 df)Pro Tip: Use CHISQ.INV.RT in new workbooks. CHIINV finds the x value where the right-tail area equals the given probability.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcCompatibility
=CONFIDENCE(alpha, standard_dev, size)
Returns the confidence interval for a population mean using a normal distribution. Replaced by CONFIDENCE.NORM in Excel 2010+.
=CONFIDENCE(0.05, 2.5, 50) — Returns the half-width of the 95% confidence interval with standard deviation 2.5 and sample size 50Pro Tip: Use CONFIDENCE.NORM in new workbooks. For T-distribution confidence intervals (small samples), use CONFIDENCE.T instead.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcCompatibility
=COVAR(array1, array2)
Returns the population covariance of two data sets. Replaced by COVARIANCE.P in Excel 2010+.
=COVAR(A1:A10, B1:B10) — Returns the population covariance between the two data setsPro Tip: COVAR divides by n (population). Use COVARIANCE.S for the sample covariance (divides by n-1). In new workbooks use COVARIANCE.P.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcCompatibility
=CRITBINOM(trials, probability_s, alpha)
Returns the smallest value for which the cumulative binomial distribution is greater than or equal to a criterion value. Replaced by BINOM.INV in Excel 2010+.
=CRITBINOM(100, 0.5, 0.95) — Returns the minimum number of successes needed for the cumulative probability to reach 95%Pro Tip: Use BINOM.INV in new workbooks. CRITBINOM is the inverse of the cumulative binomial and is useful for determining pass/fail thresholds.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcCompatibility
=EXPONDIST(x, lambda, cumulative)
Returns the exponential distribution. Replaced by EXPON.DIST in Excel 2010+.
=EXPONDIST(1, 0.5, TRUE) — Returns the cumulative exponential distribution at x = 1 with rate 0.5Pro Tip: Use EXPON.DIST in new workbooks. Set cumulative to FALSE for the probability density function.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcCompatibility
=FDIST(x, deg_freedom1, deg_freedom2)
Returns the right-tailed F probability distribution. Replaced by F.DIST.RT in Excel 2010+.
=FDIST(4.0, 5, 10) — Returns the right-tailed F distribution probabilityPro Tip: FDIST returns the right-tail probability, used in ANOVA F-tests. Use F.DIST.RT in new workbooks.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcCompatibility
=FINV(probability, deg_freedom1, deg_freedom2)
Returns the inverse of the right-tailed F probability distribution. Replaced by F.INV.RT in Excel 2010+.
=FINV(0.05, 5, 10) — Returns the critical F value at 5% significance for 5 and 10 degrees of freedomPro Tip: Use F.INV.RT in new workbooks. FINV finds the F value where the right-tail area equals the given probability.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcCompatibility
=FTEST(array1, array2)
Returns the result of an F-test for two data sets (the two-tailed probability that the variances are not significantly different). Replaced by F.TEST in Excel 2010+.
=FTEST(A1:A20, B1:B20) — Returns the p-value from the F-test comparing variances of the two setsPro Tip: Use F.TEST in new workbooks. A small p-value (e.g. < 0.05) suggests the variances are significantly different.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcCompatibility
=GAMMADIST(x, alpha, beta, cumulative)
Returns the gamma distribution. Replaced by GAMMA.DIST in Excel 2010+.
=GAMMADIST(10, 9, 2, FALSE) — Returns the gamma distribution PDF at x = 10 with alpha 9 and beta 2Pro Tip: Use GAMMA.DIST in new workbooks. The gamma distribution generalizes the exponential and chi-squared distributions.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcCompatibility
=GAMMAINV(probability, alpha, beta)
Returns the inverse of the gamma cumulative distribution. Replaced by GAMMA.INV in Excel 2010+.
=GAMMAINV(0.5, 9, 2) — Returns the x value at which the cumulative gamma distribution equals 0.5Pro Tip: Use GAMMA.INV in new workbooks. GAMMAINV solves for the x such that GAMMADIST(x, alpha, beta, TRUE) = probability.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcCompatibility
=HYPGEOMDIST(sample_s, number_sample, population_s, number_pop)
Returns the hypergeometric distribution probability. Replaced by HYPGEOM.DIST in Excel 2010+.
=HYPGEOMDIST(1, 4, 8, 20) — Probability of exactly 1 success drawing 4 items from 20 where 8 are successesPro Tip: Use HYPGEOM.DIST in new workbooks. Hypergeometric distribution models sampling without replacement, unlike the binomial.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcCompatibility
=LOGINV(probability, mean, standard_dev)
Returns the inverse of the lognormal cumulative distribution function. Replaced by LOGNORM.INV in Excel 2010+.
=LOGINV(0.5, 3.5, 1.2) — Returns the x value at which the lognormal CDF with mean 3.5 and std dev 1.2 equals 0.5Pro Tip: Use LOGNORM.INV in new workbooks. LOGINV and LOGNORMDIST use the mean and standard deviation of ln(x), not of x itself.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcCompatibility
=LOGNORMDIST(x, mean, standard_dev)
Returns the cumulative lognormal distribution. Replaced by LOGNORM.DIST in Excel 2010+.
=LOGNORMDIST(4, 3.5, 1.2) — Returns the cumulative lognormal probability at x = 4Pro Tip: Use LOGNORM.DIST in new workbooks. Lognormal distributions model data that is the product of many random variables, like stock prices.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcCompatibility
=NEGBINOMDIST(number_f, number_s, probability_s)
Returns the negative binomial distribution. Replaced by NEGBINOM.DIST in Excel 2010+.
=NEGBINOMDIST(10, 5, 0.25) — Probability of 10 failures before the 5th success with 25% success ratePro Tip: Use NEGBINOM.DIST in new workbooks. The negative binomial models the number of failures before a specified number of successes.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcCompatibility
=NORMDIST(x, mean, standard_dev, cumulative)
Returns the normal distribution for the specified mean and standard deviation. Replaced by NORM.DIST in Excel 2010+.
=NORMDIST(42, 40, 1.5, TRUE) — Returns the cumulative normal probability at x = 42 with mean 40 and std dev 1.5Pro Tip: Use NORM.DIST in new workbooks. Set cumulative to FALSE for the PDF (bell curve height) or TRUE for the CDF (area under the curve).
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcCompatibility
=NORMINV(probability, mean, standard_dev)
Returns the inverse of the normal cumulative distribution. Replaced by NORM.INV in Excel 2010+.
=NORMINV(0.95, 100, 15) — Returns the value below which 95% of a normal distribution with mean 100 and std dev 15 fallsPro Tip: Use NORM.INV in new workbooks. NORMINV is useful for calculating percentile-based thresholds.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcCompatibility
=NORMSDIST(z)
Returns the standard normal cumulative distribution function (mean 0, standard deviation 1). Replaced by NORM.S.DIST in Excel 2010+.
=NORMSDIST(1.96) — Returns ~0.975 (the area under the standard normal curve left of z = 1.96)Pro Tip: Use NORM.S.DIST in new workbooks. NORMSDIST is equivalent to NORMDIST(z, 0, 1, TRUE).
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcCompatibility
=NORMSINV(probability)
Returns the inverse of the standard normal cumulative distribution (mean 0, standard deviation 1). Replaced by NORM.S.INV in Excel 2010+.
=NORMSINV(0.975) — Returns ~1.96 (the z-score for a 97.5% cumulative probability)Pro Tip: Use NORM.S.INV in new workbooks. NORMSINV is commonly used to find z-scores for confidence levels.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcCompatibility
=PERCENTRANK(array, x, [significance])
Returns the rank of a value in a data set as a percentage. Replaced by PERCENTRANK.INC in Excel 2010+.
=PERCENTRANK(A1:A100, 50) — Returns the percentage rank of the value 50 within the data setPro Tip: Use PERCENTRANK.INC (inclusive) or PERCENTRANK.EXC (exclusive) in new workbooks. The significance argument controls decimal places in the result.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcCompatibility
=POISSON(x, mean, cumulative)
Returns the Poisson distribution. Replaced by POISSON.DIST in Excel 2010+.
=POISSON(5, 3, FALSE) — Returns the probability of exactly 5 events when the expected number is 3Pro Tip: Use POISSON.DIST in new workbooks. The Poisson distribution models the number of events in a fixed interval when events occur independently at a constant rate.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcCompatibility
=TDIST(x, deg_freedom, tails)
Returns the probability for the Student t-distribution. Replaced by T.DIST, T.DIST.RT, and T.DIST.2T in Excel 2010+.
=TDIST(1.96, 30, 2) — Returns the two-tailed t-distribution probability with 30 degrees of freedomPro Tip: Use T.DIST.2T (two-tailed) or T.DIST.RT (right-tailed) in new workbooks. The tails argument must be 1 (one-tailed) or 2 (two-tailed).
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcCompatibility
=TINV(probability, deg_freedom)
Returns the inverse of the two-tailed Student t-distribution. Replaced by T.INV.2T in Excel 2010+.
=TINV(0.05, 30) — Returns the critical t-value for a two-tailed test at 5% significance with 30 dfPro Tip: TINV always returns the two-tailed inverse. Use T.INV for one-tailed or T.INV.2T for two-tailed in new workbooks.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcCompatibility
=TTEST(array1, array2, tails, type)
Returns the probability associated with a Student t-test. Replaced by T.TEST in Excel 2010+.
=TTEST(A1:A20, B1:B20, 2, 2) — Returns the two-tailed p-value from a two-sample equal variance t-testPro Tip: Use T.TEST in new workbooks. Type: 1 = paired, 2 = two-sample equal variance, 3 = two-sample unequal variance (Welch's test).
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcCompatibility
=WEIBULL(x, alpha, beta, cumulative)
Returns the Weibull distribution. Replaced by WEIBULL.DIST in Excel 2010+.
=WEIBULL(105, 20, 100, TRUE) — Returns the cumulative Weibull distribution probability at x = 105Pro Tip: Use WEIBULL.DIST in new workbooks. The Weibull distribution is widely used in reliability engineering and failure analysis.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcCompatibility
=ZTEST(array, x, [sigma])
Returns the one-tailed p-value of a z-test. Replaced by Z.TEST in Excel 2010+.
=ZTEST(A1:A50, 10) — Returns the probability that the sample mean is greater than 10Pro Tip: Use Z.TEST in new workbooks. If sigma is omitted, the sample standard deviation is used. For a two-tailed test, multiply the result by 2.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcNew / 365 Latest
=GROUPBY(row_fields, values, function, [field_headers], [total_depth], [sort_order], [filter_array])
Groups data by row fields and aggregates values using a specified function, returning a dynamic summary table.
=GROUPBY(A2:A100, C2:C100, SUM) — Groups values in column A and sums the corresponding values in column C=GROUPBY(A2:B100, D2:D100, AVERAGE, 1) — Groups by two columns and averages column D, treating the first row as a headerPro Tip: GROUPBY replaces many pivot table scenarios with a formula. You can pass built-in functions like SUM, AVERAGE, COUNT, or custom LAMBDA functions as the aggregation function.
Works in: Excel 365New / 365 Latest
=PIVOTBY(row_fields, col_fields, values, function, [field_headers], [row_total_depth], [col_total_depth], [sort_order], [filter_array])
Creates a pivot-table-like summary with both row and column groupings, aggregating values using a specified function.
=PIVOTBY(A2:A100, B2:B100, C2:C100, SUM) — Pivots data with column A as rows, column B as columns, and sums column C valuesPro Tip: PIVOTBY is the formula equivalent of a pivot table. It dynamically spills and updates. Use LAMBDA functions for custom aggregations like weighted averages.
Works in: Excel 365New / 365 Latest
=PERCENTOF(data_values, total_values)
Calculates the percentage that a subset of data represents of a total data set.
=PERCENTOF(FILTER(B2:B100, A2:A100="East"), B2:B100) — Returns the percentage of total sales attributed to the East regionPro Tip: PERCENTOF is designed to work inside GROUPBY and PIVOTBY as the aggregation function, making percentage-of-total calculations effortless.
Works in: Excel 365New / 365 Latest
=TRANSLATE(text, [source_language], [target_language])
Translates text from one language to another using Microsoft's cloud translation service.
=TRANSLATE("Hello", "en", "es") — Translates "Hello" from English to Spanish, returning "Hola"=TRANSLATE(A1, , "fr") — Auto-detects the source language and translates the text in A1 to FrenchPro Tip: Omit the source_language to auto-detect. Language codes follow BCP 47 format (e.g., en, es, fr, de, ja, zh-Hans). Requires an internet connection.
Works in: Excel 365New / 365 Latest
=DETECTLANGUAGE(text)
Detects the language of the given text and returns the language code using Microsoft's cloud language detection service.
=DETECTLANGUAGE("Bonjour le monde") — Returns "fr" (French)=DETECTLANGUAGE(A1) — Detects and returns the language code of the text in cell A1Pro Tip: Use DETECTLANGUAGE to dynamically set the source_language argument in TRANSLATE, or to categorize multilingual data by language.
Works in: Excel 365Math & Trigonometry
=SUMX2MY2(array_x, array_y)
Returns the sum of the difference of squares of corresponding values in two arrays. Calculates Σ(x²−y²).
=SUMX2MY2(A1:A5, B1:B5) — Returns the sum of (A1²−B1²) + (A2²−B2²) + ... + (A5²−B5²)Pro Tip: Useful in statistical regression analysis and hypothesis testing. Both arrays must have the same number of data points.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=SUMX2PY2(array_x, array_y)
Returns the sum of the sum of squares of corresponding values in two arrays. Calculates Σ(x²+y²).
=SUMX2PY2(A1:A5, B1:B5) — Returns the sum of (A1²+B1²) + (A2²+B2²) + ... + (A5²+B5²)Pro Tip: Often used in distance calculations and multivariate analysis. Both arrays must be the same length.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=SUMXMY2(array_x, array_y)
Returns the sum of squares of differences of corresponding values in two arrays. Calculates Σ(x−y)².
=SUMXMY2(A1:A5, B1:B5) — Returns (A1−B1)² + (A2−B2)² + ... + (A5−B5)²Pro Tip: This is the sum of squared residuals, a key component in least-squares regression. Useful for measuring the distance between two data sets.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=BASE(number, radix, [min_length])
Converts a decimal number into a text representation in another base (radix).
=BASE(255, 16) — Returns "FF" (255 in hexadecimal)=BASE(10, 2, 8) — Returns "00001010" (10 in binary, padded to 8 characters)Pro Tip: Radix must be between 2 and 36. Use min_length to pad the result with leading zeros. For common bases, you can also use DEC2BIN, DEC2HEX, or DEC2OCT.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=DECIMAL(text, radix)
Converts a text representation of a number in a given base into a decimal number.
=DECIMAL("FF", 16) — Returns 255 (FF hex to decimal)=DECIMAL("1010", 2) — Returns 10 (binary 1010 to decimal)Pro Tip: Radix must be between 2 and 36. This is the inverse of BASE. For common bases, you can also use BIN2DEC, HEX2DEC, or OCT2DEC.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=SUMSQ(number1, [number2], ...)
Returns the sum of the squares of the arguments.
=SUMSQ(3, 4) — Returns 25 (9 + 16)=SUMSQ(A1:A10) — Returns the sum of squares of all values in A1:A10Pro Tip: Useful in statistical calculations like variance and standard deviation. Equivalent to SUMPRODUCT(range, range) for a single range.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=LOG10(number)
Returns the base-10 logarithm of a number.
=LOG10(100) — Returns 2 (10² = 100)=LOG10(1000) — Returns 3Pro Tip: Equivalent to LOG(number, 10). Use LN for natural logarithm (base e) and LOG for any arbitrary base.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=SQRTPI(number)
Returns the square root of (number × π).
=SQRTPI(1) — Returns 1.7724... (the square root of π)=SQRTPI(2) — Returns 2.5066... (the square root of 2π)Pro Tip: Commonly used in statistical formulas involving the normal distribution. Equivalent to SQRT(number*PI()).
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=ASINH(number)
Returns the inverse hyperbolic sine of a number.
=ASINH(1) — Returns 0.8813... (the value whose SINH equals 1)=ASINH(0) — Returns 0Pro Tip: The inverse hyperbolic sine is defined for all real numbers. It equals LN(number + SQRT(number² + 1)).
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=ACOSH(number)
Returns the inverse hyperbolic cosine of a number. Number must be greater than or equal to 1.
=ACOSH(1) — Returns 0=ACOSH(10) — Returns 2.9932...Pro Tip: The input must be ≥ 1, otherwise the function returns a #NUM! error. Equals LN(number + SQRT(number² − 1)).
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=ATANH(number)
Returns the inverse hyperbolic tangent of a number. Number must be between -1 and 1 (exclusive).
=ATANH(0.5) — Returns 0.5493...=ATANH(0) — Returns 0Pro Tip: Used in the Fisher transformation for correlation coefficients. Input must satisfy -1 < number < 1.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=CSCH(number)
Returns the hyperbolic cosecant of an angle specified in radians.
=CSCH(1) — Returns 0.8509... (1/SINH(1))=CSCH(2) — Returns 0.2757...Pro Tip: CSCH is the reciprocal of SINH: CSCH(x) = 1/SINH(x). The input cannot be 0.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=SECH(number)
Returns the hyperbolic secant of an angle specified in radians.
=SECH(0) — Returns 1=SECH(1) — Returns 0.6480... (1/COSH(1))Pro Tip: SECH is the reciprocal of COSH: SECH(x) = 1/COSH(x). Always returns a value between 0 and 1.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=ACOTH(number)
Returns the inverse hyperbolic cotangent of a number. The absolute value must be greater than 1.
=ACOTH(2) — Returns 0.5493...=ACOTH(5) — Returns 0.2027...Pro Tip: Returns #NUM! if the absolute value of the input is less than or equal to 1. Equals 0.5 * LN((number+1)/(number-1)).
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=COMBINA(number, number_chosen)
Returns the number of combinations with repetitions for a given number of items.
=COMBINA(4, 3) — Returns 20 (combinations with repetition of 3 items from 4)=COMBINA(10, 2) — Returns 55Pro Tip: COMBINA allows items to be repeated, unlike COMBIN. Equals COMBIN(number + number_chosen - 1, number_chosen).
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcMath & Trigonometry
=PERMUTATIONA(number, number_chosen)
Returns the number of permutations for a given number of objects that can be selected from the total, with repetitions allowed.
=PERMUTATIONA(3, 2) — Returns 9 (3² — each of 2 positions can be any of 3 items)=PERMUTATIONA(4, 3) — Returns 64 (4³)Pro Tip: Equals number^number_chosen. Unlike PERMUT, items can be reused in each position.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=FORECAST.ETS(target_date, values, timeline, [seasonality], [data_completion], [aggregation])
Returns a forecasted value for a specific target date using exponential triple smoothing (ETS), which captures seasonality patterns.
=FORECAST.ETS(DATE(2025,1,1), B2:B25, A2:A25) — Forecasts the value for Jan 1 2025 based on historical data=FORECAST.ETS(DATE(2025,6,1), B2:B25, A2:A25, 12) — Forecasts with a 12-period seasonal cyclePro Tip: Set seasonality to 0 for automatic detection, or 1 to disable seasonality. This function handles missing data points and irregular timelines better than FORECAST.
Works in: Excel 365, Excel 2021, Excel 2019Statistical
=FORECAST.ETS.CONFINT(target_date, values, timeline, [confidence_level], [seasonality], [data_completion], [aggregation])
Returns a confidence interval for the forecast value at the specified target date using exponential triple smoothing.
=FORECAST.ETS.CONFINT(DATE(2025,1,1), B2:B25, A2:A25, 0.95) — Returns the 95% confidence interval width for the forecastPro Tip: The default confidence level is 0.95 (95%). Subtract/add this value from/to FORECAST.ETS to get the lower and upper bounds.
Works in: Excel 365, Excel 2021, Excel 2019Statistical
=FORECAST.ETS.SEASONALITY(values, timeline, [data_completion], [aggregation])
Returns the length of the repetitive seasonal pattern that Excel detects in the specified time series.
=FORECAST.ETS.SEASONALITY(B2:B49, A2:A49) — Returns the detected seasonal period length (e.g., 12 for monthly data with yearly seasonality)Pro Tip: Use this to verify the seasonality FORECAST.ETS detects automatically. If the result seems wrong, override it manually in FORECAST.ETS.
Works in: Excel 365, Excel 2021, Excel 2019Statistical
=FORECAST.ETS.STAT(values, timeline, statistic_type, [seasonality], [data_completion], [aggregation])
Returns a statistical value related to the ETS forecast model, such as alpha, beta, gamma, MASE, SMAPE, MAE, or RMSE.
=FORECAST.ETS.STAT(B2:B49, A2:A49, 1) — Returns the alpha (base) smoothing parameter=FORECAST.ETS.STAT(B2:B49, A2:A49, 5) — Returns the SMAPE (Symmetric Mean Absolute Percentage Error)Pro Tip: Statistic types: 1=Alpha, 2=Beta, 3=Gamma, 4=MASE, 5=SMAPE, 6=MAE, 7=RMSE, 8=Step size detected. Use MASE or SMAPE to evaluate forecast accuracy.
Works in: Excel 365, Excel 2021, Excel 2019Statistical
=FORECAST.LINEAR(x, known_ys, known_xs)
Calculates a future value along a linear trend using existing values. This is the modern replacement for FORECAST.
=FORECAST.LINEAR(15, B2:B10, A2:A10) — Predicts the y-value when x is 15 based on a linear trendPro Tip: Identical to the legacy FORECAST function. Uses the equation y = a + bx where b = SLOPE and a = INTERCEPT. For non-linear or seasonal data, use FORECAST.ETS.
Works in: Excel 365, Excel 2021, Excel 2019, Google SheetsStatistical
=RSQ(known_ys, known_xs)
Returns the R-squared (coefficient of determination) of the linear regression line through the given data points.
=RSQ(B2:B20, A2:A20) — Returns the R² value (0 to 1) indicating how well the regression line fits the dataPro Tip: R² of 1 means a perfect fit, 0 means no linear relationship. RSQ equals PEARSON(known_ys, known_xs)². Use it to evaluate how well a linear model explains your data.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=STEYX(known_ys, known_xs)
Returns the standard error of the predicted y-value for each x in a linear regression.
=STEYX(B2:B20, A2:A20) — Returns the standard error of the regression estimatePro Tip: A smaller STEYX indicates a tighter fit. Use it to build confidence intervals around FORECAST predictions: forecast ± t-value × STEYX.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=FISHER(x)
Returns the Fisher transformation at x. This transforms the correlation coefficient so it is approximately normally distributed.
=FISHER(0.75) — Returns 0.9729... (the Fisher transformation of 0.75)Pro Tip: x must be between -1 and 1 (exclusive). The Fisher transformation is 0.5 × LN((1+x)/(1−x)), equivalent to ATANH(x). Used to test the significance of correlation coefficients.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=FISHERINV(y)
Returns the inverse of the Fisher transformation. Converts a Fisher-transformed value back to a correlation coefficient.
=FISHERINV(0.9729) — Returns approximately 0.75=FISHERINV(FISHER(0.6)) — Returns 0.6 (round-trip)Pro Tip: The inverse Fisher transformation is (EXP(2y)−1)/(EXP(2y)+1), equivalent to TANH(y). Use after performing hypothesis tests on Fisher-transformed correlations.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=PHI(x)
Returns the value of the density function for a standard normal distribution at x.
=PHI(0) — Returns 0.3989... (the peak of the standard normal curve)=PHI(1) — Returns 0.2419...Pro Tip: PHI returns the probability density (height of the bell curve), not the cumulative probability. For cumulative probability use NORM.S.DIST(x, TRUE).
Works in: Excel 365, Excel 2021, Excel 2019Statistical
=GAUSS(z)
Returns the probability that a member of a standard normal population will fall between the mean and z standard deviations from the mean.
=GAUSS(1) — Returns 0.3413... (probability between mean and 1 standard deviation)=GAUSS(2) — Returns 0.4772...Pro Tip: GAUSS(z) = NORM.S.DIST(z, TRUE) − 0.5. It gives the area under the curve between 0 and z. For negative z, the result is negative.
Works in: Excel 365, Excel 2021, Excel 2019Statistical
=COVARIANCE.P(array1, array2)
Returns population covariance — the average of the products of deviations for each data point pair across two data sets.
=COVARIANCE.P(A2:A20, B2:B20) — Returns the population covariance between the two data setsPro Tip: Population covariance divides by N. If your data is a sample, use COVARIANCE.S (divides by N−1). Covariance measures how two variables move together.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=COVARIANCE.S(array1, array2)
Returns the sample covariance — the average of the products of deviations for each data point pair, using N−1 in the denominator.
=COVARIANCE.S(A2:A20, B2:B20) — Returns the sample covariance between the two data setsPro Tip: Use COVARIANCE.S for sample data (most real-world scenarios). It applies Bessel's correction (N−1) for an unbiased estimate.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=PEARSON(array1, array2)
Returns the Pearson product-moment correlation coefficient r, a measure of the linear relationship between two data sets.
=PEARSON(A2:A20, B2:B20) — Returns a value between -1 and 1 indicating correlation strength and directionPro Tip: PEARSON returns the same result as CORREL. A value near 1 indicates strong positive correlation, near -1 strong negative, and near 0 no linear relationship. Square it to get RSQ.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=BETA.DIST(x, alpha, beta, cumulative, [A], [B])
Returns the beta distribution, commonly used to study percentage or proportion variation across samples.
=BETA.DIST(0.4, 2, 5, TRUE) — Returns the cumulative probability at x=0.4 with alpha=2, beta=5=BETA.DIST(0.4, 2, 5, FALSE) — Returns the probability density at x=0.4Pro Tip: A and B define the lower and upper bounds of the interval (default 0 and 1). Set cumulative to TRUE for CDF, FALSE for PDF.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=BETA.INV(probability, alpha, beta, [A], [B])
Returns the inverse of the cumulative beta distribution function for a specified probability.
=BETA.INV(0.5, 2, 5) — Returns the median of the Beta(2,5) distributionPro Tip: This is the quantile function of the beta distribution. Useful for finding critical values in Bayesian analysis.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=HYPGEOM.DIST(sample_s, number_sample, population_s, number_pop, cumulative)
Returns the hypergeometric distribution — the probability of a given number of sample successes from a finite population.
=HYPGEOM.DIST(3, 5, 10, 20, FALSE) — Probability of exactly 3 successes drawing 5 from a population of 20 with 10 successes=HYPGEOM.DIST(3, 5, 10, 20, TRUE) — Cumulative probability of 3 or fewer successesPro Tip: Use instead of BINOM.DIST when sampling without replacement. Common in quality control and card-drawing probability problems.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=LOGNORM.DIST(x, mean, standard_dev, cumulative)
Returns the lognormal distribution of x, where the natural logarithm of x is normally distributed.
=LOGNORM.DIST(4, 3.5, 1.2, TRUE) — Returns the cumulative lognormal probability at x=4=LOGNORM.DIST(4, 3.5, 1.2, FALSE) — Returns the lognormal density at x=4Pro Tip: The lognormal distribution is used to model positive-valued data that is right-skewed, like stock prices, income, and city sizes.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=LOGNORM.INV(probability, mean, standard_dev)
Returns the inverse of the lognormal cumulative distribution function.
=LOGNORM.INV(0.5, 3.5, 1.2) — Returns the median of the lognormal distribution with the given parametersPro Tip: Useful for finding threshold values. For example, if income follows a lognormal distribution, use this to find the income at a given percentile.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=NEGBINOM.DIST(number_f, number_s, probability_s, cumulative)
Returns the negative binomial distribution — the probability of a specified number of failures before a given number of successes.
=NEGBINOM.DIST(5, 10, 0.6, FALSE) — Probability of exactly 5 failures before 10 successes with 60% success rate=NEGBINOM.DIST(5, 10, 0.6, TRUE) — Cumulative probability of up to 5 failures before 10 successesPro Tip: Used in modeling count data with overdispersion (variance exceeds the mean), which the Poisson distribution cannot handle.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=GAMMA(number)
Returns the Gamma function value. For positive integers, GAMMA(n) = (n-1)! (factorial).
=GAMMA(5) — Returns 24 (which is 4! = 4×3×2×1)=GAMMA(0.5) — Returns 1.7724... (√π)Pro Tip: The Gamma function extends the factorial to non-integer and complex numbers. It returns #NUM! for zero and negative integers.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=GAMMALN(x)
Returns the natural logarithm of the Gamma function, Γ(x). Useful for very large factorials where GAMMA would overflow.
=GAMMALN(5) — Returns 3.1780... (LN of 24)=GAMMALN(0.5) — Returns 0.5723... (LN of √π)Pro Tip: Use GAMMALN when working with large numbers to avoid overflow. You can compute the Gamma function as EXP(GAMMALN(x)).
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=GAMMALN.PRECISE(x)
Returns the natural logarithm of the Gamma function with higher precision than GAMMALN.
=GAMMALN.PRECISE(4.5) — Returns 2.7918... with full precisionPro Tip: Functionally equivalent to GAMMALN in most cases but provides better accuracy for edge cases. x must be positive.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcText
=DBCS(text)
Converts half-width (single-byte) characters to full-width (double-byte) characters in a text string. Used primarily for East Asian languages.
=DBCS("ABC") — Converts half-width ABC to full-width ABCPro Tip: This is the opposite of ASC. Only affects characters that have double-byte equivalents. Most useful when working with Japanese, Chinese, or Korean text formatting.
Works in: Excel 365, Excel 2021, Excel 2019Lookup & Reference
=GETPIVOTDATA(data_field, pivot_table, [field1, item1], [field2, item2], ...)
Extracts data stored in a PivotTable report. Returns summarized data from a PivotTable based on specified field/item pairs.
=GETPIVOTDATA("Sales", A3) — Returns the grand total of the Sales field from the PivotTable containing cell A3=GETPIVOTDATA("Sales", A3, "Region", "East", "Year", 2024) — Returns Sales for the East region in 2024Pro Tip: Click on a PivotTable cell while typing a formula to auto-generate GETPIVOTDATA. To disable this, go to PivotTable Options > Generate GetPivotData.
Works in: Excel 365, Excel 2021, Excel 2019, Google SheetsLookup & Reference
=FIELDVALUE(value, field_name)
Retrieves field data from linked data types such as Stocks, Geography, or Organization data types in Excel.
=FIELDVALUE(A2, "Price") — Extracts the Price field from the stock data type in A2=FIELDVALUE(A2, "Population") — Extracts the Population field from a Geography data typePro Tip: You can also use the dot notation A2.Price instead of FIELDVALUE. This function works only with cells containing linked data types from Microsoft's cloud services.
Works in: Excel 365Date & Time
=DATESTRING(date_serial_number)
Converts a date serial number into a text string in the Japanese date format (Imperial era calendar).
=DATESTRING(44927) — Returns the Japanese Imperial era date string for January 1, 2023Pro Tip: This function is specific to the Japanese version of Excel and uses the Japanese Emperor era calendar. It may not be available in all Excel versions.
Works in: Excel 365 (Japanese), Excel 2019 (Japanese)Financial
=AMORLINC(cost, date_purchased, first_period, salvage, period, rate, [basis])
Returns the depreciation for each accounting period using linear depreciation prorated to the period of purchase (French accounting system).
=AMORLINC(2400, DATE(2023,1,1), DATE(2023,12,31), 300, 1, 0.15) — Returns the linear depreciation for period 1 of an asset costing 2400 with 300 salvage valuePro Tip: Used in the French accounting system. Unlike SLN, AMORLINC prorates the first and last period's depreciation based on the purchase date.
Works in: Excel 365, Excel 2021, Excel 2019Financial
=AMORDEGRC(cost, date_purchased, first_period, salvage, period, rate, [basis])
Returns the depreciation for each accounting period using a degressive (accelerated) depreciation coefficient (French accounting system).
=AMORDEGRC(2400, DATE(2023,1,1), DATE(2023,12,31), 300, 1, 0.15) — Returns the degressive depreciation for period 1Pro Tip: The degressive coefficient depends on the asset's useful life: 1.0 for 3-4 years, 1.5 for 5-6 years, 2.0 for 6+ years. Specific to French tax depreciation rules.
Works in: Excel 365, Excel 2021, Excel 2019Financial
=COUPDAYBS(settlement, maturity, frequency, [basis])
Returns the number of days from the beginning of a coupon period to the settlement date.
=COUPDAYBS(DATE(2024,4,15), DATE(2030,1,15), 2) — Returns the days from coupon period start to the April 15 settlement date (semiannual)Pro Tip: Frequency: 1=Annual, 2=Semiannual, 4=Quarterly. Basis: 0=US 30/360, 1=Actual/actual, 2=Actual/360, 3=Actual/365, 4=European 30/360.
Works in: Excel 365, Excel 2021, Excel 2019Financial
=COUPDAYS(settlement, maturity, frequency, [basis])
Returns the total number of days in the coupon period that contains the settlement date.
=COUPDAYS(DATE(2024,4,15), DATE(2030,1,15), 2) — Returns the total days in the coupon period (e.g., 181 for semiannual)Pro Tip: Use COUPDAYBS/COUPDAYS to calculate accrued interest on bonds. The result depends on the day-count basis convention.
Works in: Excel 365, Excel 2021, Excel 2019Financial
=COUPDAYSNC(settlement, maturity, frequency, [basis])
Returns the number of days from the settlement date to the next coupon date.
=COUPDAYSNC(DATE(2024,4,15), DATE(2030,1,15), 2) — Returns the days remaining until the next coupon paymentPro Tip: Equals COUPDAYS minus COUPDAYBS. Useful for calculating clean vs. dirty bond prices.
Works in: Excel 365, Excel 2021, Excel 2019Financial
=COUPNCD(settlement, maturity, frequency, [basis])
Returns the next coupon date after the settlement date as a serial date number.
=COUPNCD(DATE(2024,4,15), DATE(2030,1,15), 2) — Returns the date of the next coupon payment after April 15, 2024Pro Tip: Format the result as a date to see the actual date. Use with COUPDAYSNC to determine how far away the next coupon payment is.
Works in: Excel 365, Excel 2021, Excel 2019Financial
=COUPNUM(settlement, maturity, frequency, [basis])
Returns the number of coupon payments remaining between the settlement date and maturity date.
=COUPNUM(DATE(2024,4,15), DATE(2030,1,15), 2) — Returns the number of remaining semiannual coupon paymentsPro Tip: The result is always rounded up to the nearest whole coupon. Multiply by coupon payment amount to estimate total remaining cash flows.
Works in: Excel 365, Excel 2021, Excel 2019Financial
=COUPPCD(settlement, maturity, frequency, [basis])
Returns the previous coupon date before the settlement date as a serial date number.
=COUPPCD(DATE(2024,4,15), DATE(2030,1,15), 2) — Returns the date of the last coupon payment before April 15, 2024Pro Tip: Format the result as a date. The difference between settlement and COUPPCD represents accrued interest days.
Works in: Excel 365, Excel 2021, Excel 2019Financial
=SYD(cost, salvage, life, per)
Returns the sum-of-years' digits depreciation of an asset for a specified period.
=SYD(30000, 7500, 10, 1) — Returns 4090.91 — first year depreciation of a $30,000 asset with $7,500 salvage over 10 years=SYD(30000, 7500, 10, 10) — Returns 409.09 — tenth (last) year depreciationPro Tip: SYD provides higher depreciation in early years. The formula is: (cost - salvage) × (life - per + 1) / (life × (life + 1) / 2).
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcFinancial
=VDB(cost, salvage, life, start_period, end_period, [factor], [no_switch])
Returns the depreciation of an asset for any period you specify using the variable declining balance method.
=VDB(100000, 10000, 10, 0, 1) — Returns the depreciation for the first year=VDB(100000, 10000, 10, 4, 5, 2, TRUE) — Returns year 5 depreciation using double-declining without switching to straight-linePro Tip: VDB is the most flexible depreciation function. Set no_switch to TRUE to prevent switching to straight-line when declining balance depreciation is less than SLN.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcFinancial
=ISPMT(rate, per, nper, pv)
Calculates the interest paid during a specific period of an investment with even principal payments.
=ISPMT(0.05/12, 1, 36, 100000) — Returns the interest portion for period 1 of a $100,000 loan at 5% over 36 monthsPro Tip: Unlike IPMT, ISPMT assumes even principal payments (not even total payments). The result is always negative for loans. Formula: pv × rate × (per/nper − 1).
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcFinancial
=PDURATION(rate, pv, fv)
Returns the number of periods required for an investment to reach a specified future value at a given interest rate.
=PDURATION(0.05, 1000, 2000) — Returns 14.2 — the number of periods to double $1,000 at 5% per period=PDURATION(0.08, 10000, 25000) — Returns the periods needed to grow $10,000 to $25,000 at 8%Pro Tip: Uses the formula: (LOG(fv) − LOG(pv)) / LOG(1 + rate). Works with any consistent rate and period combination (annual, monthly, etc.).
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcFinancial
=RRI(nper, pv, fv)
Returns an equivalent interest rate for the growth of an investment over a given number of periods.
=RRI(10, 1000, 2500) — Returns 0.0960... (9.6% per period rate to grow $1,000 to $2,500 in 10 periods)=RRI(5, 100, 150) — Returns the compound annual growth rate (CAGR) over 5 periodsPro Tip: RRI calculates the CAGR (Compound Annual Growth Rate): (fv/pv)^(1/nper) − 1. It assumes compound growth with no intermediate cash flows.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcFinancial
=PRICEMAT(settlement, maturity, issue, rate, yld, [basis])
Returns the price per $100 face value of a security that pays interest at maturity.
=PRICEMAT(DATE(2024,3,15), DATE(2025,3,15), DATE(2023,3,15), 0.05, 0.04) — Returns the price of a security paying 5% interest at maturity, yielding 4%Pro Tip: Unlike PRICE which is for periodic-coupon bonds, PRICEMAT handles securities where all interest is paid at maturity (e.g., certificates of deposit, zero-coupon bonds with accrued interest).
Works in: Excel 365, Excel 2021, Excel 2019Financial
=YIELDMAT(settlement, maturity, issue, rate, pr, [basis])
Returns the annual yield of a security that pays interest at maturity.
=YIELDMAT(DATE(2024,3,15), DATE(2025,3,15), DATE(2023,3,15), 0.05, 99) — Returns the yield for a security priced at 99 per 100 face valuePro Tip: This is the inverse of PRICEMAT. Use it to determine the yield when you know the market price of an interest-at-maturity security.
Works in: Excel 365, Excel 2021, Excel 2019Financial
=YIELDDISC(settlement, maturity, pr, redemption, [basis])
Returns the annual yield for a discounted security (e.g., Treasury bills).
=YIELDDISC(DATE(2024,3,15), DATE(2024,9,15), 98.5, 100) — Returns the annualized yield for a security bought at 98.5 and redeemed at 100Pro Tip: Discounted securities are bought below face value and redeemed at face value. The yield represents the annualized return from that discount.
Works in: Excel 365, Excel 2021, Excel 2019Financial
=PRICEDISC(settlement, maturity, discount, redemption, [basis])
Returns the price per $100 face value of a discounted security.
=PRICEDISC(DATE(2024,3,15), DATE(2024,9,15), 0.04, 100) — Returns the price of a security with a 4% discount rate, redeemed at 100Pro Tip: Price = redemption − discount × redemption × (days to maturity / days in year). Common for Treasury bills and commercial paper.
Works in: Excel 365, Excel 2021, Excel 2019Financial
=ACCRINTM(issue, settlement, rate, par, [basis])
Returns the accrued interest for a security that pays interest at maturity.
=ACCRINTM(DATE(2023,1,1), DATE(2024,1,1), 0.06, 1000) — Returns 60 — the accrued interest on a $1,000 par security at 6% held for one yearPro Tip: Unlike ACCRINT which handles periodic coupon bonds, ACCRINTM is for securities where interest accrues until maturity (like CDs or zero-coupon notes).
Works in: Excel 365, Excel 2021, Excel 2019Information
=ISNONTEXT(value)
Returns TRUE if the value is not text (numbers, dates, logicals, errors, blanks all return TRUE). Returns FALSE only for text strings.
=ISNONTEXT(123) — Returns TRUE (number is not text)=ISNONTEXT("Hello") — Returns FALSE (it is text)=ISNONTEXT(A1) — Returns TRUE if A1 is blank, a number, a date, logical, or errorPro Tip: ISNONTEXT is the opposite of ISTEXT. Note that blank cells return TRUE for ISNONTEXT. Use it in data validation to ensure cells do not contain text.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=IMSUM(inumber1, [inumber2], ...)
Returns the sum of two or more complex numbers in x+yi text format.
=IMSUM("3+4i", "1+2i") — Returns "4+6i"=IMSUM("5+3i", "2-1i", "-1+4i") — Returns "6+6i"Pro Tip: All complex number arguments must be in text format like "a+bi". You can also use cell references containing complex number strings.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=IMSUB(inumber1, inumber2)
Returns the difference of two complex numbers in x+yi text format.
=IMSUB("5+4i", "1+2i") — Returns "4+2i"Pro Tip: Order matters: IMSUB(a, b) returns a − b. For subtraction of multiple complex numbers, nest IMSUB calls or use IMSUM with negated values.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=IMPRODUCT(inumber1, [inumber2], ...)
Returns the product of two or more complex numbers in x+yi text format.
=IMPRODUCT("3+4i", "1+2i") — Returns "-5+10i" ((3×1 − 4×2) + (3×2 + 4×1)i)Pro Tip: Complex multiplication uses (a+bi)(c+di) = (ac−bd) + (ad+bc)i. IMPRODUCT can take multiple arguments and multiplies them sequentially.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=IMDIV(inumber1, inumber2)
Returns the quotient of two complex numbers in x+yi text format.
=IMDIV("5+10i", "1+2i") — Returns "5+0i" (i.e., 5)Pro Tip: Division is (a+bi)/(c+di) = ((ac+bd)/(c²+d²)) + ((bc−ad)/(c²+d²))i. Returns #NUM! if the divisor is zero.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=IMPOWER(inumber, number)
Returns a complex number raised to a power.
=IMPOWER("2+3i", 2) — Returns "-5+12i"=IMPOWER("1+i", 3) — Returns "-2+2i"Pro Tip: Uses De Moivre's theorem: (r×e^(iθ))^n = r^n × e^(i×n×θ). The exponent can be any real number, including negative and fractional values.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=IMSQRT(inumber)
Returns the square root of a complex number in x+yi text format.
=IMSQRT("-1") — Returns "0+1i" (i, the imaginary unit)=IMSQRT("3+4i") — Returns "2+1i"Pro Tip: Returns the principal square root. For real negative numbers, this gives you the imaginary result that SQRT cannot provide.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=IMLN(inumber)
Returns the natural logarithm of a complex number in x+yi text format.
=IMLN("1+i") — Returns "0.346573590279973+0.785398163397448i"Pro Tip: The complex natural log is LN(|z|) + i×arg(z). For negative real numbers, this returns a result with π as the imaginary part.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=IMLOG2(inumber)
Returns the base-2 logarithm of a complex number in x+yi text format.
=IMLOG2("4+3i") — Returns the base-2 logarithm of the complex number 4+3iPro Tip: Computed as IMLN(inumber) / LN(2). Useful in signal processing and information theory involving complex signals.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=IMLOG10(inumber)
Returns the base-10 logarithm of a complex number in x+yi text format.
=IMLOG10("4+3i") — Returns the common logarithm of the complex number 4+3iPro Tip: Computed as IMLN(inumber) / LN(10). Useful for decibel calculations in electrical engineering.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=IMARGUMENT(inumber)
Returns the argument θ (theta) of a complex number, i.e., the angle in radians from the positive real axis.
=IMARGUMENT("3+4i") — Returns 0.9272... radians (about 53.13°)=IMARGUMENT("0+1i") — Returns 1.5707... (π/2 radians = 90°)Pro Tip: The argument is the angle in polar form: z = r × e^(iθ). Use with IMABS to convert between rectangular and polar representation.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=IMCONJUGATE(inumber)
Returns the complex conjugate of a complex number (negates the imaginary part).
=IMCONJUGATE("3+4i") — Returns "3-4i"=IMCONJUGATE("2-5i") — Returns "2+5i"Pro Tip: The conjugate of a+bi is a−bi. Multiplying a complex number by its conjugate gives a real number: (a+bi)(a−bi) = a² + b².
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=IMCOS(inumber)
Returns the cosine of a complex number in x+yi text format.
=IMCOS("1+i") — Returns the complex cosine of 1+iPro Tip: Complex cosine is defined as cos(a+bi) = cos(a)cosh(b) − i×sin(a)sinh(b). Essential in AC circuit analysis and wave propagation.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=IMSIN(inumber)
Returns the sine of a complex number in x+yi text format.
=IMSIN("1+i") — Returns the complex sine of 1+iPro Tip: Complex sine is defined as sin(a+bi) = sin(a)cosh(b) + i×cos(a)sinh(b). Used in Fourier analysis and signal processing.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=IMTAN(inumber)
Returns the tangent of a complex number in x+yi text format.
=IMTAN("1+i") — Returns the complex tangent of 1+iPro Tip: Complex tangent equals IMSIN/IMCOS. Can return very large values near singularities of the tangent function.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=IMEXP(inumber)
Returns the exponential of a complex number (e raised to the power of a complex number) in x+yi text format.
=IMEXP("0+3.14159i") — Returns approximately "-1+0i" (Euler's identity: e^(iπ) = -1)=IMEXP("1+0i") — Returns "2.71828..." (just e)Pro Tip: By Euler's formula: e^(a+bi) = e^a × (cos(b) + i×sin(b)). This is fundamental to representing sinusoidal signals in engineering.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcCompatibility
=CHITEST(actual_range, expected_range)
Returns the p-value from the chi-squared test for independence. Replaced by CHISQ.TEST in Excel 2010+.
=CHITEST(A1:C3, E1:G3) — Returns the p-value testing whether observed frequencies differ significantly from expectedPro Tip: Use CHISQ.TEST in new workbooks. A small p-value (e.g., < 0.05) suggests the row and column variables are not independent.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcCompatibility
=STDEVP(number1, [number2], ...)
Calculates the standard deviation based on the entire population. Replaced by STDEV.P in Excel 2010+.
=STDEVP(A1:A100) — Returns the population standard deviation of the values in A1:A100Pro Tip: Use STDEV.P in new workbooks. STDEVP divides by N (population), while STDEV divides by N−1 (sample). Use STDEVP only when you have data for the entire population.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcCompatibility
=VARP(number1, [number2], ...)
Calculates variance based on the entire population. Replaced by VAR.P in Excel 2010+.
=VARP(A1:A100) — Returns the population variance of the values in A1:A100Pro Tip: Use VAR.P in new workbooks. VARP divides the sum of squared deviations by N. For sample data, use VAR (which divides by N−1).
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=PERCENTRANK.INC(array, x, [significance])
Returns the rank of a value in a data set as a percentage (0 to 1, inclusive). This is the modern replacement for PERCENTRANK.
=PERCENTRANK.INC(A1:A100, 50) — Returns the percentile rank of 50, including 0% and 100%Pro Tip: PERCENTRANK.INC includes the endpoints 0 and 1. Use PERCENTRANK.EXC to exclude them (values range from 1/(n+1) to n/(n+1)).
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=PERCENTRANK.EXC(array, x, [significance])
Returns the rank of a value in a data set as a percentage, excluding 0 and 1 from the range.
=PERCENTRANK.EXC(A1:A100, 50) — Returns the exclusive percentile rank of 50Pro Tip: Values range from 1/(n+1) to n/(n+1). This avoids giving any value a rank of exactly 0% or 100%, which is statistically more rigorous for small samples.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=T.DIST.2T(x, deg_freedom)
Returns the two-tailed Student's t-distribution — the probability that a value falls outside ±x standard deviations.
=T.DIST.2T(2, 10) — Returns the two-tailed p-value for t=2 with 10 degrees of freedomPro Tip: For hypothesis testing, compare the result to your significance level (e.g., 0.05). T.DIST.2T(x, df) = 2 × T.DIST.RT(x, df) when x > 0.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=T.DIST.RT(x, deg_freedom)
Returns the right-tailed Student's t-distribution — the probability that a value exceeds x.
=T.DIST.RT(1.96, 30) — Returns the right-tail probability for t=1.96 with 30 degrees of freedomPro Tip: T.DIST.RT(x, df) = 1 − T.DIST(x, df, TRUE). Use for one-sided hypothesis tests where you only care about values greater than x.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=T.INV.2T(probability, deg_freedom)
Returns the two-tailed inverse of the Student's t-distribution — the t-value for a given two-tailed probability.
=T.INV.2T(0.05, 10) — Returns 2.228... (the critical t-value for 95% confidence with 10 df)Pro Tip: Use this for confidence interval calculations: mean ± T.INV.2T(alpha, df) × (stdev/SQRT(n)). Always returns a positive value.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=F.DIST.RT(x, deg_freedom1, deg_freedom2)
Returns the right-tailed F probability distribution — the probability that an F-statistic exceeds x.
=F.DIST.RT(3.5, 5, 20) — Returns the right-tail probability for F=3.5 with 5 and 20 degrees of freedomPro Tip: Commonly used in ANOVA. F.DIST.RT(x, df1, df2) = 1 − F.DIST(x, df1, df2, TRUE). A small result suggests significant differences between groups.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=F.INV.RT(probability, deg_freedom1, deg_freedom2)
Returns the inverse of the right-tailed F probability distribution — the critical F-value for a given probability.
=F.INV.RT(0.05, 5, 20) — Returns the critical F-value at the 5% significance levelPro Tip: Use to find the critical F-value in ANOVA. If your calculated F-statistic exceeds this value, reject the null hypothesis.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=CHISQ.DIST.RT(x, deg_freedom)
Returns the right-tailed probability of the chi-squared distribution.
=CHISQ.DIST.RT(5.991, 2) — Returns approximately 0.05 (the p-value for the 95% critical value with 2 df)Pro Tip: Chi-squared is always right-tailed in practice. CHISQ.DIST.RT(x, df) = 1 − CHISQ.DIST(x, df, TRUE).
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=CHISQ.INV.RT(probability, deg_freedom)
Returns the inverse of the right-tailed chi-squared distribution — the critical value for a given right-tail probability.
=CHISQ.INV.RT(0.05, 2) — Returns 5.991 (the critical chi-squared value at 5% significance with 2 df)Pro Tip: Use to find chi-squared critical values for hypothesis testing. If your chi-squared statistic exceeds this value, reject the null hypothesis.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcStatistical
=BINOM.DIST.RANGE(trials, probability_s, number_s, [number_s2])
Returns the probability of a trial result using a binomial distribution, optionally between two values.
=BINOM.DIST.RANGE(100, 0.5, 45, 55) — Returns the probability of 45 to 55 successes in 100 trials at 50% success rate=BINOM.DIST.RANGE(10, 0.3, 3) — Returns the probability of exactly 3 successes in 10 trialsPro Tip: When number_s2 is provided, returns the cumulative probability from number_s to number_s2. Without it, returns the probability of exactly number_s successes.
Works in: Excel 365, Excel 2021, Excel 2019Statistical
=BINOM.INV(trials, probability_s, alpha)
Returns the smallest value for which the cumulative binomial distribution is greater than or equal to a criterion value.
=BINOM.INV(100, 0.5, 0.95) — Returns the number of successes at the 95th percentile for 100 trials at 50%Pro Tip: This is the inverse of BINOM.DIST (cumulative). Use it to determine the minimum number of successes needed to exceed a given cumulative probability.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcCompatibility
=VARA(value1, [value2], ...)
Estimates variance based on a sample, including text and logical values. Text and FALSE = 0, TRUE = 1.
=VARA(A1:A100) — Returns the sample variance treating TRUE as 1, FALSE and text as 0Pro Tip: Use VAR.S if you want to ignore text and logical values. VARA is useful when TRUE/FALSE values are meaningful data points in your analysis.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcCompatibility
=VARPA(value1, [value2], ...)
Calculates variance based on the entire population, including text and logical values. Text and FALSE = 0, TRUE = 1.
=VARPA(A1:A100) — Returns the population variance treating TRUE as 1, FALSE and text as 0Pro Tip: Use VAR.P if you want to ignore text and logical values. VARPA divides by N (population count), unlike VARA which divides by N−1.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcCompatibility
=STDEVA(value1, [value2], ...)
Estimates standard deviation based on a sample, including text and logical values. Text and FALSE = 0, TRUE = 1.
=STDEVA(A1:A100) — Returns the sample standard deviation treating TRUE as 1, FALSE and text as 0Pro Tip: Use STDEV.S if you want to ignore text and logical values. STDEVA is the square root of VARA.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcCompatibility
=STDEVPA(value1, [value2], ...)
Calculates standard deviation based on the entire population, including text and logical values. Text and FALSE = 0, TRUE = 1.
=STDEVPA(A1:A100) — Returns the population standard deviation treating TRUE as 1, FALSE and text as 0Pro Tip: Use STDEV.P if you want to ignore text and logical values. STDEVPA is the square root of VARPA.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=ERF.PRECISE(x)
Returns the error function integrated between 0 and x with higher precision.
=ERF.PRECISE(1) — Returns 0.8427... (the error function value at x=1)Pro Tip: ERF.PRECISE always integrates from 0 to x, unlike ERF which can take a lower bound. Provides better numerical accuracy for edge cases.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcEngineering
=ERFC.PRECISE(x)
Returns the complementary error function integrated between x and infinity with higher precision.
=ERFC.PRECISE(1) — Returns 0.1572... (1 − ERF.PRECISE(1))Pro Tip: ERFC.PRECISE(x) = 1 − ERF.PRECISE(x). More accurate than computing 1 − ERF(x) directly, especially for large x values.
Works in: Excel 365, Excel 2021, Excel 2019, Google Sheets, LibreOffice CalcFinancial
=ODDLYIELD(settlement, maturity, last_interest, rate, pr, redemption, frequency, [basis])
Returns the yield of a security with an odd (short or long) last coupon period.
=ODDLYIELD(DATE(2024,6,1), DATE(2025,3,15), DATE(2024,9,15), 0.05, 99, 100, 2) — Returns the yield for a security with an irregular last periodPro Tip: Use when the final coupon period is not a standard length. Pair with ODDLPRICE to value securities with irregular last periods.
Works in: Excel 365, Excel 2021, Excel 2019Financial
=ODDFYIELD(settlement, maturity, issue, first_coupon, rate, pr, redemption, frequency, [basis])
Returns the yield of a security with an odd (short or long) first coupon period.
=ODDFYIELD(DATE(2024,3,15), DATE(2030,1,15), DATE(2024,1,1), DATE(2024,7,15), 0.05, 99, 100, 2) — Returns the yield for a security with an irregular first periodPro Tip: Use when the first coupon period after issue is not a standard length (e.g., a bond issued between regular coupon dates).
Works in: Excel 365, Excel 2021, Excel 2019Statistical
=SKEW.P(number1, [number2], ...)
Returns the skewness of a distribution based on a population: a characterization of the degree of asymmetry around its mean.
=SKEW.P(A1:A100) — Returns the population skewness of the dataPro Tip: Positive skewness means a longer right tail, negative means longer left tail, zero means symmetric. Unlike SKEW, SKEW.P uses N (not N−1) and is for the full population.
Works in: Excel 365, Excel 2021, Excel 2019File & Workbook
Windows: Ctrl + N | Mac: ⌘ + N
Create a new blank workbook.
Pro Tip: This opens a fresh workbook instantly without going through the File menu templates screen.
File & Workbook
Windows: Ctrl + O | Mac: ⌘ + O
Open an existing workbook from your computer or recent files.
Pro Tip: Press Ctrl+O twice quickly to jump straight to the Browse dialog, bypassing the Backstage view.
File & Workbook
Windows: Ctrl + S | Mac: ⌘ + S
Save the current workbook. Prompts Save As if the file has never been saved.
Pro Tip: Build a habit of pressing Ctrl+S after every significant change. AutoSave in Microsoft 365 does not replace intentional saving for non-cloud files.
File & Workbook
Windows: F12 | Mac: ⌘ + ⇧ + S
Save the workbook with a new name, location, or file format.
Pro Tip: Use Save As to quickly create a backup copy before making destructive changes to your data.
File & Workbook
Windows: Ctrl + P | Mac: ⌘ + P
Open the Print dialog to preview and print the current worksheet.
Pro Tip: Set your print area first with Page Layout > Print Area to avoid printing blank pages.
File & Workbook
Windows: Ctrl + F2 | Mac: ⌘ + F2
Open Print Preview to see how the worksheet will look when printed.
Pro Tip: Always check Print Preview before printing to catch layout issues like cut-off columns.
File & Workbook
Windows: Ctrl + W | Mac: ⌘ + W
Close the current workbook without closing Excel.
Pro Tip: If you have multiple workbooks open, this closes only the active one. Use Alt+F4 to close Excel entirely.
File & Workbook
Windows: Alt + F4 | Mac: ⌘ + Q
Close the Excel application entirely.
Pro Tip: Excel will prompt you to save any unsaved workbooks before closing.
File & Workbook
Windows: Alt + F | Mac: ⌘ + F
Open the File tab (Backstage view) for file operations.
Pro Tip: From Backstage, press I for Info, N for New, O for Open, and other letters for quick navigation.
File & Workbook
Windows: F12, then choose PDF | Mac: ⌘ + ⇧ + S, then choose PDF
Save the current workbook as a PDF file via Save As dialog.
Pro Tip: Before saving as PDF, define the print area and check Page Break Preview to control which cells are exported.
File & Workbook
Windows: Alt + F, H | Mac: ⌘ + ⇧ + E
Open the Share pane to share the workbook with others.
Pro Tip: The workbook must be saved to OneDrive or SharePoint before you can share it with real-time collaboration.
File & Workbook
Windows: Alt + F, R | Mac: ⌘ + O, then Recent
View the list of recently opened workbooks.
Pro Tip: Pin frequently used workbooks to the Recent list so they stay accessible even after opening many other files.
File & Workbook
Windows: Ctrl + F4 | Mac: ⌘ + W
Close the active workbook window without closing other open workbooks.
Pro Tip: Ctrl+F4 closes only the active document window, which is useful when you have multiple workbooks open and want to close one at a time.
File & Workbook
Windows: Ctrl + Shift + S | Mac: ⌘ + ⇧ + S
Open the Save As dialog to save the workbook with a new name, location, or format.
Pro Tip: In Microsoft 365 with AutoSave enabled, Ctrl+Shift+S opens Save a Copy instead of Save As, preserving the original cloud file.
Navigation
Windows: Up Arrow | Mac: Up Arrow
Move the active cell one row up.
Pro Tip: Combine with Shift to select while moving.
Navigation
Windows: Down Arrow | Mac: Down Arrow
Move the active cell one row down.
Pro Tip: Press Enter to move down and confirm the current cell entry at the same time.
Navigation
Windows: Left Arrow | Mac: Left Arrow
Move the active cell one column to the left.
Pro Tip: Press Shift+Tab to move left while in data entry mode.
Navigation
Windows: Right Arrow | Mac: Right Arrow
Move the active cell one column to the right.
Pro Tip: Press Tab to move right and confirm the current cell entry simultaneously.
Navigation
Windows: Ctrl + Arrow Key | Mac: ⌘ + Arrow Key
Jump to the last non-empty cell in the direction of the arrow, or to the next non-empty cell if currently on a blank.
Pro Tip: This is the fastest way to navigate large datasets. Ctrl+Down jumps to the last row of contiguous data in that column.
Navigation
Windows: Ctrl + Home | Mac: ⌃ + Home / ⌘ + Fn + Left Arrow
Move the active cell to cell A1.
Pro Tip: Great for quickly returning to the top-left corner after scrolling deep into a large spreadsheet.
Navigation
Windows: Ctrl + End | Mac: ⌃ + End / ⌘ + Fn + Right Arrow
Move to the last cell that contains data or formatting in the worksheet.
Pro Tip: If this goes further than expected, there may be hidden formatting. Delete unused rows/columns to reset the used range.
Navigation
Windows: Home | Mac: Home / Fn + Left Arrow
Move the active cell to column A of the current row.
Pro Tip: Combine with Shift+Home to select from the current cell to the start of the row.
Navigation
Windows: Page Down | Mac: Page Down / Fn + Down Arrow
Scroll down one screen and move the active cell accordingly.
Pro Tip: The number of rows scrolled depends on how many rows are visible on your screen.
Navigation
Windows: Page Up | Mac: Page Up / Fn + Up Arrow
Scroll up one screen and move the active cell accordingly.
Pro Tip: Use Alt+Page Down and Alt+Page Up to scroll one screen right or left.
Navigation
Windows: Alt + Page Down | Mac: ⌥ + Page Down / Fn + ⌥ + Down Arrow
Scroll the view one screen to the right.
Pro Tip: Useful for wide datasets with many columns where horizontal scrolling is needed.
Navigation
Windows: Alt + Page Up | Mac: ⌥ + Page Up / Fn + ⌥ + Up Arrow
Scroll the view one screen to the left.
Pro Tip: Combine with the right-scroll shortcut to quickly pan across wide spreadsheets.
Navigation
Windows: Ctrl + G / F5 | Mac: ⌃ + G / F5
Open the Go To dialog to jump to a specific cell reference or named range.
Pro Tip: Type a cell address like Z1000 directly in the Name Box (left of the formula bar) and press Enter for even faster navigation.
Navigation
Windows: Ctrl + Page Down | Mac: ⌃ + Page Down / ⌥ + Right Arrow
Move to the next worksheet tab in the workbook.
Pro Tip: Hold Ctrl and press Page Down repeatedly to cycle through multiple sheets quickly.
Navigation
Windows: Ctrl + Page Up | Mac: ⌃ + Page Up / ⌥ + Left Arrow
Move to the previous worksheet tab in the workbook.
Pro Tip: Combine with Shift to select multiple sheets: Ctrl+Shift+Page Up/Down.
Navigation
Windows: Tab | Mac: Tab
Move to the next unlocked cell on a protected sheet.
Pro Tip: On unprotected sheets, Tab moves one cell to the right. On protected sheets, it skips locked cells.
Navigation
Windows: Scroll Lock + Arrow Keys | Mac: Scroll Lock + Arrow Keys
Scroll the worksheet without changing the active cell position.
Pro Tip: Check if Scroll Lock is active by looking at the status bar at the bottom of Excel.
Navigation
Windows: F6 | Mac: F6
Move to the next pane in a split worksheet or between Ribbon, worksheet, and status bar.
Pro Tip: Use Shift+F6 to move to the previous pane. Useful when you have split the window into multiple views.
Navigation
Windows: Ctrl + Tab | Mac: ⌘ + ` (backtick)
Cycle through open Excel workbook windows.
Pro Tip: Use Ctrl+Shift+Tab to cycle in reverse order through open workbooks.
Navigation
Windows: Ctrl + F5 (click Name Box) | Mac: Click Name Box
Activate the Name Box to type a cell address or named range directly.
Pro Tip: Type a range like A1:D10 in the Name Box and press Enter to select that entire range instantly.
Navigation
Windows: Enter / Shift + Enter | Mac: Return / ⇧ + Return
Move down (Enter) or up (Shift+Enter) within a selected range without leaving the selection.
Pro Tip: After selecting a range, use Tab and Enter to fill in data cell by cell within that range only.
Navigation
Windows: Ctrl + Backspace | Mac: ⌘ + Delete
Scroll the worksheet to bring the active cell back into view without changing the selection.
Pro Tip: If you have scrolled far away from the active cell, this instantly brings the view back to it without losing your place in the data.
Navigation
Windows: Ctrl + F6 | Mac: ⌘ + ` (backtick)
Switch to the next open workbook window.
Pro Tip: This is especially useful when working with multiple Excel files side by side for data comparison or cross-referencing.
Navigation
Windows: Ctrl + Shift + F6 | Mac: ⌘ + ⇧ + ` (backtick)
Switch to the previous open workbook window.
Pro Tip: Use this to quickly toggle back to the workbook you were just working in, like Alt+Tab but within Excel only.
Navigation
Windows: Ctrl + . (period) | Mac: ⌃ + . (period)
Move the active cell clockwise to the next corner of the selected range.
Pro Tip: When you have a large range selected, use this to jump between the four corners to verify the selection boundaries without deselecting.
Navigation
Windows: Ctrl + Shift + Page Up | Mac: ⌃ + ⇧ + Page Up
Add the previous worksheet tab to the selection of grouped sheets.
Pro Tip: This lets you group-select multiple adjacent sheets for batch operations like formatting or printing without using the mouse.
Navigation
Windows: Ctrl + Shift + Page Down | Mac: ⌃ + ⇧ + Page Down
Add the next worksheet tab to the selection of grouped sheets.
Pro Tip: After grouping sheets, any edits such as typing data or applying formatting will apply to all grouped sheets simultaneously.
Selection
Windows: Shift + Space | Mac: ⇧ + Space
Select the entire row of the active cell.
Pro Tip: After selecting a row, press Ctrl+Minus to delete it or Ctrl+Plus to insert a new row above.
Selection
Windows: Ctrl + Space | Mac: ⌃ + Space
Select the entire column of the active cell.
Pro Tip: If you are in edit mode, Ctrl+Space may trigger autocomplete. Press Escape first to exit edit mode.
Selection
Windows: Ctrl + A | Mac: ⌘ + A
Select all cells in the worksheet. If inside a data region, first press selects the region, second press selects the entire sheet.
Pro Tip: Click the Select All button at the intersection of row and column headers for the same effect.
Selection
Windows: Shift + Arrow Key | Mac: ⇧ + Arrow Key
Extend the current selection by one cell in the arrow direction.
Pro Tip: This is the fundamental building block for keyboard-based range selection.
Selection
Windows: Ctrl + Shift + Arrow Key | Mac: ⌘ + ⇧ + Arrow Key
Extend the selection to the last non-empty cell in the arrow direction.
Pro Tip: Use Ctrl+Shift+End to select from the current cell to the last used cell in the worksheet.
Selection
Windows: Ctrl + Shift + Home | Mac: ⌃ + ⇧ + Home
Extend the selection from the current cell to cell A1.
Pro Tip: Useful for selecting all data from the current position back to the top-left corner.
Selection
Windows: Ctrl + Shift + End | Mac: ⌃ + ⇧ + End
Extend the selection from the current cell to the last used cell.
Pro Tip: If the selection extends beyond your actual data, clear formatting from unused cells to shrink the used range.
Selection
Windows: Shift + Home | Mac: ⇧ + Home / ⇧ + Fn + Left Arrow
Extend the selection from the current cell to the beginning of the row.
Pro Tip: Combine with Ctrl+Shift+Home to select from current cell to A1.
Selection
Windows: Alt + ; (semicolon) | Mac: ⌘ + ⇧ + Z
Select only the visible cells in the current selection, excluding hidden rows and columns.
Pro Tip: Essential when copying filtered data. Without this, pasting may include hidden rows, causing data errors.
Selection
Windows: Ctrl + Click | Mac: ⌘ + Click
Add individual cells or ranges to the current selection without deselecting.
Pro Tip: You can also hold Ctrl and drag to add multiple non-contiguous ranges to your selection.
Selection
Windows: Ctrl + Shift + * (asterisk) | Mac: ⌃ + ⇧ + * (asterisk)
Select the current data region around the active cell, bounded by empty rows and columns.
Pro Tip: This is the same region that Ctrl+T uses to detect table boundaries. Great for quickly selecting a data block.
Selection
Windows: Ctrl + / | Mac: ⌃ + /
Select the array that contains the active cell.
Pro Tip: Helpful for identifying the full extent of a legacy CSE (Ctrl+Shift+Enter) array formula.
Selection
Windows: Ctrl + Shift + O | Mac: ⌃ + ⇧ + O
Select all cells that contain comments or notes.
Pro Tip: Use this to quickly audit which cells have annotations before sharing a workbook.
Selection
Windows: Ctrl + \ | Mac: ⌃ + \
In a selected range, select cells in each row that differ from the comparison cell.
Pro Tip: The comparison cell is the active cell in the selection. Use this to spot inconsistencies across rows.
Selection
Windows: Ctrl + Shift + | | Mac: ⌃ + ⇧ + |
In a selected range, select cells in each column that differ from the comparison cell.
Pro Tip: Useful for QA checks on columnar data where values should be consistent.
Selection
Windows: Ctrl + ] | Mac: ⌃ + ]
Select cells that directly depend on (reference) the active cell.
Pro Tip: Use Ctrl+Shift+] to select all dependents, including indirect ones.
Selection
Windows: Ctrl + [ | Mac: ⌃ + [
Select cells that are directly referenced by the formula in the active cell.
Pro Tip: Use Ctrl+Shift+[ to select all precedents, including indirect ones. Great for formula auditing.
Selection
Windows: Shift + Backspace | Mac: ⇧ + Delete
Reduce the current selection to only the active cell.
Pro Tip: When you have a large range selected and want to keep only the active cell selected without clicking, this shortcut collapses the selection instantly.
Editing & Data Entry
Windows: Ctrl + C | Mac: ⌘ + C
Copy the selected cells to the clipboard.
Pro Tip: The marching ants border around copied cells disappears after you press Escape or perform another action. Paste before that happens for Paste Special options.
Editing & Data Entry
Windows: Ctrl + X | Mac: ⌘ + X
Cut the selected cells to the clipboard for moving.
Pro Tip: Cut and Paste in Excel updates all formula references automatically, unlike Copy and Paste which copies formulas as-is.
Editing & Data Entry
Windows: Ctrl + V | Mac: ⌘ + V
Paste the clipboard contents into the selected cell(s).
Pro Tip: If you get unexpected results, use Ctrl+Z to undo and then try Paste Special for more control.
Editing & Data Entry
Windows: Ctrl + Alt + V | Mac: ⌘ + ⌃ + V
Open the Paste Special dialog for pasting only values, formulas, formats, or other attributes.
Pro Tip: Paste Special > Values is the most common choice. It strips formulas and pastes only the calculated results.
Editing & Data Entry
Windows: Ctrl + Alt + V, then V, Enter | Mac: ⌘ + ⌃ + V, then V, Return
Paste only the values (no formulas or formatting) from the clipboard.
Pro Tip: An even faster method: after copying, press Alt+H, V, V to paste values via the Ribbon in one sequence.
Editing & Data Entry
Windows: Ctrl + Z | Mac: ⌘ + Z
Undo the last action. Can be pressed multiple times to undo several steps.
Pro Tip: Excel keeps up to 100 undo levels. However, some actions like deleting a sheet cannot be undone.
Editing & Data Entry
Windows: Ctrl + Y | Mac: ⌘ + Y
Redo the last undone action.
Pro Tip: Ctrl+Y also repeats the last action. For example, if you just inserted a row, Ctrl+Y inserts another row.
Editing & Data Entry
Windows: Ctrl + D | Mac: ⌘ + D
Fill the selected cells downward with the content of the topmost cell.
Pro Tip: Select a range where the top cell has your formula, then Ctrl+D fills it into all selected cells below.
Editing & Data Entry
Windows: Ctrl + R | Mac: ⌘ + R
Fill the selected cells to the right with the content of the leftmost cell.
Pro Tip: Works like Fill Down but horizontally. Select from the source cell rightward, then press Ctrl+R.
Editing & Data Entry
Windows: F2 | Mac: F2 / ⌃ + U
Enter edit mode for the active cell, placing the cursor at the end of the cell content.
Pro Tip: Press F2 to toggle between Edit mode and Point mode when building formulas. In Point mode, arrow keys select cell references instead of moving the cursor.
Editing & Data Entry
Windows: Delete | Mac: Delete / Fn + Backspace
Clear the contents of the selected cells without removing formatting.
Pro Tip: Use Ctrl+Minus to delete entire cells/rows/columns. The Delete key only clears content, not the cells themselves.
Editing & Data Entry
Windows: Alt + H, E, A | Mac: ⌘ + ⇧ + Delete (or Menu)
Clear everything from the selected cells: contents, formatting, and comments.
Pro Tip: Use the Clear menu (Alt+H, E) to choose what to clear: All, Formats, Contents, Comments, or Hyperlinks.
Editing & Data Entry
Windows: Enter | Mac: Return
Confirm the cell entry and move to the cell below.
Pro Tip: You can change the direction Enter moves in File > Options > Advanced > 'After pressing Enter, move selection.'
Editing & Data Entry
Windows: Ctrl + Enter | Mac: ⌃ + Return
Confirm the cell entry and keep the active cell in the same position.
Pro Tip: If you have multiple cells selected, Ctrl+Enter fills the same value into all selected cells simultaneously.
Editing & Data Entry
Windows: Shift + Enter | Mac: ⇧ + Return
Confirm the cell entry and move to the cell above.
Pro Tip: Useful when entering data in a column from bottom to top.
Editing & Data Entry
Windows: Escape | Mac: Escape
Cancel the current cell entry or operation and revert to the previous value.
Pro Tip: Press Escape to dismiss dialog boxes, cancel drag operations, or exit edit mode without changes.
Editing & Data Entry
Windows: Ctrl + ; (semicolon) | Mac: ⌃ + ; (semicolon)
Insert today's date as a static value in the active cell.
Pro Tip: Unlike the TODAY() function, this inserts a fixed date that will not change when the workbook recalculates.
Editing & Data Entry
Windows: Ctrl + Shift + ; (semicolon) | Mac: ⌘ + ; (semicolon)
Insert the current time as a static value in the active cell.
Pro Tip: Combine date and time by pressing Ctrl+; then Space then Ctrl+Shift+; to get a full timestamp.
Editing & Data Entry
Windows: Alt + Enter | Mac: ⌥ + Return
Start a new line within the same cell.
Pro Tip: The cell must have Wrap Text enabled for the line break to be visible. Excel enables it automatically when you use this shortcut.
Editing & Data Entry
Windows: Ctrl + - (minus) | Mac: ⌘ + - (minus)
Delete the selected cells, rows, or columns, with options to shift remaining cells.
Pro Tip: Select entire rows or columns first (Shift+Space or Ctrl+Space) before pressing Ctrl+Minus for cleaner deletions.
Editing & Data Entry
Windows: Ctrl + Shift + + (plus) | Mac: ⌘ + ⇧ + + (plus)
Insert new cells, rows, or columns at the selection.
Pro Tip: Select multiple rows or columns first to insert that many at once. Formulas referencing the area adjust automatically.
Editing & Data Entry
Windows: F7 | Mac: F7
Start the spell checker for the current worksheet.
Pro Tip: Spell check starts from the active cell and works through the sheet. Select a range first to check only that area.
Editing & Data Entry
Windows: Ctrl + E | Mac: ⌘ + E
Automatically fill values based on a detected pattern from adjacent data.
Pro Tip: Type one or two examples in the column next to your data, then press Ctrl+E. Excel detects the pattern and fills the rest.
Editing & Data Entry
Windows: Ctrl + ' (apostrophe) | Mac: ⌃ + ' (apostrophe)
Copy the formula from the cell directly above into the active cell and enter edit mode.
Pro Tip: Unlike Ctrl+D which copies and confirms, Ctrl+' copies the formula and lets you edit it before pressing Enter. Great for tweaking a formula from the row above.
Editing & Data Entry
Windows: Ctrl + Shift + " (double quote) | Mac: ⌃ + ⇧ + " (double quote)
Copy the displayed value (not the formula) from the cell directly above into the active cell.
Pro Tip: This pastes the static value, not the formula. Useful when you want to hard-code a result from the cell above without inheriting its formula.
Formatting
Windows: Ctrl + B | Mac: ⌘ + B
Toggle bold formatting on the selected cells.
Pro Tip: Bold works as a toggle. Press Ctrl+B again to remove bold from already-bolded text.
Formatting
Windows: Ctrl + I | Mac: ⌘ + I
Toggle italic formatting on the selected cells.
Pro Tip: Italic text can be harder to read in smaller font sizes. Consider using bold or color instead for emphasis in data cells.
Formatting
Windows: Ctrl + U | Mac: ⌘ + U
Toggle underline formatting on the selected cells.
Pro Tip: For double underline (common in accounting), use the Format Cells dialog: Ctrl+1, then Font tab.
Formatting
Windows: Ctrl + 5 | Mac: ⌘ + ⇧ + X
Toggle strikethrough formatting on the selected cells.
Pro Tip: Strikethrough is great for marking completed items in task lists without deleting the text.
Formatting
Windows: Ctrl + 1 | Mac: ⌘ + 1
Open the Format Cells dialog box for detailed formatting options.
Pro Tip: This is the most powerful formatting dialog in Excel. It gives you access to Number, Alignment, Font, Border, Fill, and Protection tabs.
Formatting
Windows: Alt + H, F, G | Mac: ⌘ + ⇧ + > (period)
Increase the font size of the selected cells.
Pro Tip: Each press increases to the next standard font size (e.g., 10 to 11 to 12 to 14).
Formatting
Windows: Alt + H, F, K | Mac: ⌘ + ⇧ + < (comma)
Decrease the font size of the selected cells.
Pro Tip: Each press decreases to the next smaller standard font size.
Formatting
Windows: Ctrl + Shift + & | Mac: ⌘ + ⌥ + 0 (zero)
Apply an outline border around the selected cells.
Pro Tip: This applies a thin border around the outer edges of the selection only, not between individual cells.
Formatting
Windows: Ctrl + Shift + _ (underscore) | Mac: ⌘ + ⌥ + - (minus)
Remove all borders from the selected cells.
Pro Tip: This removes only borders, not gridlines. Gridlines are controlled separately in the View tab.
Formatting
Windows: Ctrl + L | Mac: ⌘ + L
Left-align the contents of the selected cells.
Pro Tip: Text is left-aligned by default in Excel, while numbers are right-aligned. Changing alignment can indicate that data types may be incorrect.
Formatting
Windows: Ctrl + E | Mac: ⌘ + E
Center-align the contents of the selected cells.
Pro Tip: Note: Ctrl+E may trigger Flash Fill in newer Excel versions if you are in a data column. Use the Ribbon or Format Cells dialog as an alternative.
Formatting
Windows: Ctrl + R | Mac: ⌘ + R
Right-align the contents of the selected cells.
Pro Tip: Note: Ctrl+R is also Fill Right. The behavior depends on context. Use the Home tab alignment buttons if ambiguous.
Formatting
Windows: Alt + H, 6 | Mac: ⌃ + ⌥ + Tab
Increase the indent level of cell contents.
Pro Tip: Indenting is useful for creating visual hierarchy in text-heavy columns like category breakdowns.
Formatting
Windows: Alt + H, 5 | Mac: ⌃ + ⌥ + ⇧ + Tab
Decrease the indent level of cell contents.
Pro Tip: Indent level cannot go below zero. Remove indents to restore the default alignment.
Formatting
Windows: Alt + H, M, C | Mac: ⌃ + ⌥ + Return (or Menu)
Merge the selected cells into one and center the content.
Pro Tip: Avoid merging cells in data tables as it breaks sorting, filtering, and many formulas. Use 'Center Across Selection' from Format Cells > Alignment instead.
Formatting
Windows: Alt + H, W | Mac: ⌘ + 1, then Alignment tab
Toggle text wrapping in the selected cells so content displays on multiple lines.
Pro Tip: Wrap Text automatically adjusts row height to show all content. Double-click the row border to auto-fit height after enabling.
Formatting
Windows: Ctrl + Shift + 1 | Mac: ⌃ + ⇧ + 1
Apply the Number format with thousands separator and two decimal places.
Pro Tip: This applies the format #,##0.00 which shows negative numbers with a minus sign.
Formatting
Windows: Alt + W, V, G | Mac: View menu > Gridlines
Show or hide cell gridlines in the worksheet.
Pro Tip: Hiding gridlines gives a cleaner presentation look. Add borders manually where needed for visual structure.
Formatting
Windows: Alt + H, F, P (then click target) | Mac: ⌘ + ⌥ + C (copy format)
Copy the formatting from the selected cell and apply it to another cell or range.
Pro Tip: Double-click the Format Painter button to lock it on. Then click multiple cells to apply the same format. Press Escape to turn it off.
Formatting
Windows: Ctrl + Alt + V, T, Enter | Mac: ⌘ + ⌥ + V, then Formats
Paste only the formatting (no values or formulas) from the clipboard.
Pro Tip: First copy a formatted cell with Ctrl+C, then use this to apply its formatting to other cells.
Formatting
Windows: Alt + ' (apostrophe) | Mac: ⌘ + ⌥ + ' (apostrophe)
Open the Style dialog to apply or modify cell styles.
Pro Tip: Cell styles let you apply consistent formatting across your workbook. Modify a style once and all cells using that style update automatically.
Formatting
Windows: Ctrl + Shift + F | Mac: ⌘ + ⇧ + F
Open the Font tab of the Format Cells dialog for detailed font settings.
Pro Tip: The Font dialog gives access to advanced options like superscript, subscript, strikethrough, and special underline styles not available on the Ribbon.
Formatting
Windows: Ctrl + Shift + P | Mac: ⌘ + ⇧ + P
Activate the Font Size box on the Ribbon to type a custom font size.
Pro Tip: After pressing this shortcut, type any font size (even non-standard values like 13 or 15) and press Enter to apply it.
Formatting
Windows: Alt + H, H | Mac: Via Home tab > Fill Color
Open the Fill Color dropdown to apply a background color to selected cells.
Pro Tip: Click the dropdown arrow for the full color palette. The button itself applies the last used color, so click it directly for quick repeat coloring.
Formatting
Windows: Alt + H, F, C | Mac: Via Home tab > Font Color
Open the Font Color dropdown to change the text color of selected cells.
Pro Tip: Use dark colors on light backgrounds for readability. The button applies the last used color; click the dropdown arrow for more options.
Formatting
Windows: Alt + H, B | Mac: Via Home tab > Borders
Open the Borders dropdown menu to apply various border styles to selected cells.
Pro Tip: The borders menu includes options for top, bottom, left, right, all borders, thick borders, and even drawing custom borders with the mouse.
Formatting
Windows: Ctrl + Shift + 7 | Mac: ⌘ + ⌥ + 0 (zero)
Apply a thin outline border around the selected cells.
Pro Tip: This is equivalent to Ctrl+Shift+& on most keyboard layouts. It applies only the outer border of the selection, not internal cell borders.
Formatting
Windows: Alt + H, A, C | Mac: ⌘ + E
Center-align the contents of the selected cells using the Ribbon command.
Pro Tip: This Ribbon path avoids the Flash Fill conflict that Ctrl+E can cause in data columns. Use it when you specifically want center alignment.
Number Formatting
Windows: Ctrl + Shift + ~ (tilde) | Mac: ⌃ + ⇧ + ~ (tilde)
Apply the General number format, removing any special formatting.
Pro Tip: General format displays numbers as-is with no fixed decimal places, thousands separators, or currency symbols.
Number Formatting
Windows: Ctrl + Shift + $ (dollar) | Mac: ⌃ + ⇧ + $ (dollar)
Apply the Currency format with two decimal places and a dollar sign.
Pro Tip: This applies the locale-specific currency symbol. For a different currency, use Format Cells > Number > Currency and choose the symbol.
Number Formatting
Windows: Ctrl + Shift + % (percent) | Mac: ⌃ + ⇧ + % (percent)
Apply the Percentage format with zero decimal places.
Pro Tip: Excel multiplies the cell value by 100 when displaying as a percentage. A cell with 0.25 displays as 25%. Enter the decimal value, not the percentage.
Number Formatting
Windows: Ctrl + Shift + ^ (caret) | Mac: ⌃ + ⇧ + ^ (caret)
Apply the Scientific (exponential) number format with two decimal places.
Pro Tip: Scientific notation is useful for very large or very small numbers like 1.23E+08 instead of 123,000,000.
Number Formatting
Windows: Ctrl + Shift + # (hash) | Mac: ⌃ + ⇧ + # (hash)
Apply the Date format (DD-MMM-YY, e.g., 15-Mar-26).
Pro Tip: Excel stores dates as serial numbers internally. Applying date format makes the serial number display as a human-readable date.
Number Formatting
Windows: Ctrl + Shift + @ (at) | Mac: ⌃ + ⇧ + @ (at)
Apply the Time format (h:mm AM/PM).
Pro Tip: Excel stores times as decimal fractions of a day. 0.5 equals 12:00 PM, 0.75 equals 6:00 PM.
Number Formatting
Windows: Alt + H, 0 | Mac: ⌃ + ⇧ + ! (on some Mac layouts)
Add one decimal place to the displayed number format.
Pro Tip: This changes only the display, not the stored value. The full precision value is always used in calculations.
Number Formatting
Windows: Alt + H, 9 | Mac: Via Ribbon or Format Cells
Remove one decimal place from the displayed number format.
Pro Tip: Be careful: hiding decimals can create apparent rounding errors in totals (e.g., 33 + 33 + 33 = 100 when values are 33.33).
Number Formatting
Windows: Ctrl + Shift + ! (exclamation) | Mac: ⌃ + ⇧ + ! (exclamation)
Apply the Number format with two decimal places, thousands separator, and minus sign for negatives.
Pro Tip: This is the same as the comma style but without a currency symbol. Good for general-purpose numeric formatting.
Formulas
Windows: = (equals sign) | Mac: = (equals sign)
Begin entering a formula in the active cell.
Pro Tip: You can also start a formula with + or - but the equals sign is the standard and most reliable approach.
Formulas
Windows: Alt + = | Mac: ⌘ + ⇧ + T
Automatically insert a SUM formula for the adjacent range of numbers.
Pro Tip: AutoSum is smart about detecting the range. Place your cursor below a column of numbers or to the right of a row, then press Alt+=.
Formulas
Windows: F4 | Mac: F4 / ⌘ + T
Cycle through absolute and relative cell references in a formula ($A$1, A$1, $A1, A1).
Pro Tip: Place the cursor on a cell reference within the formula bar and press F4 to cycle. $A$1 locks both, A$1 locks row, $A1 locks column, A1 locks neither.
Formulas
Windows: Ctrl + ` (grave accent) | Mac: ⌃ + ` (grave accent)
Toggle between displaying cell values and displaying formulas in the worksheet.
Pro Tip: This is invaluable for auditing. Columns auto-widen to show full formulas. Press the shortcut again to return to normal view.
Formulas
Windows: Shift + F3 | Mac: ⇧ + F3
Open the Insert Function dialog to browse and search for functions.
Pro Tip: Use the search box in the dialog to find functions by description, e.g., 'count if' will suggest COUNTIF and COUNTIFS.
Formulas
Windows: Ctrl + Shift + Enter | Mac: ⌃ + ⇧ + Return
Enter a formula as a legacy array formula (CSE formula) with curly braces.
Pro Tip: In Microsoft 365, regular Enter creates dynamic arrays automatically. CSE arrays are only needed for backward compatibility.
Formulas
Windows: Alt + M, V | Mac: Via Formulas tab > Evaluate Formula
Open the Evaluate Formula dialog to step through a formula calculation.
Pro Tip: Click Evaluate repeatedly to see each part of the formula calculated in sequence. Essential for debugging complex nested formulas.
Formulas
Windows: Ctrl + F3 | Mac: ⌃ + F3
Open the Name Manager to create, edit, or delete named ranges.
Pro Tip: Named ranges make formulas more readable: =SUM(Revenue) is clearer than =SUM(B2:B100). They also auto-update when you add data to a Table.
Formulas
Windows: Ctrl + Shift + F3 | Mac: ⌃ + ⇧ + F3
Automatically create named ranges from row or column headers in the selection.
Pro Tip: Select your data with headers, then use this shortcut. Excel creates a named range for each column using the header text.
Formulas
Windows: Alt + M, P | Mac: Via Formulas tab > Trace Precedents
Draw arrows showing which cells are referenced by the active cell's formula.
Pro Tip: Each press adds another level of precedent arrows. Use Alt+M, A, A to remove all trace arrows.
Formulas
Windows: Alt + M, D | Mac: Via Formulas tab > Trace Dependents
Draw arrows showing which cells depend on (reference) the active cell.
Pro Tip: Use this to understand the downstream impact before changing or deleting a cell's value.
Formulas
Windows: F9 | Mac: F9
Recalculate all formulas in all open workbooks.
Pro Tip: Only needed when calculation mode is set to Manual. In Automatic mode, formulas recalculate on every change.
Formulas
Windows: Shift + F9 | Mac: ⇧ + F9
Recalculate formulas only on the active worksheet.
Pro Tip: Faster than F9 when you have multiple large workbooks open and only need to refresh the current sheet.
Formulas
Windows: Ctrl + Shift + A | Mac: ⌃ + ⇧ + A
After typing a function name, insert the argument placeholders for that function.
Pro Tip: Type =VLOOKUP then press Ctrl+Shift+A to instantly see =VLOOKUP(lookup_value,table_array,col_index_num,range_lookup) with all argument names filled in.
Formulas
Windows: Ctrl + [ | Mac: ⌃ + [
Navigate directly to the cells referenced by the formula in the active cell.
Pro Tip: Unlike the Trace Precedents arrows (Alt+M, P), this shortcut jumps you directly to the precedent cells, selecting them for immediate inspection.
Formulas
Windows: Ctrl + ] | Mac: ⌃ + ]
Navigate directly to cells that depend on the active cell.
Pro Tip: Use this to quickly find which formulas reference the current cell, jumping directly to them rather than just drawing trace arrows.
Formulas
Windows: Ctrl + Alt + F9 | Mac: ⌃ + ⌥ + F9
Recalculate all formulas in all open workbooks, regardless of whether they have changed.
Pro Tip: Use this when you suspect formulas are not updating correctly. It forces a full recalculation even for cells that Excel thinks have not changed.
Rows & Columns
Windows: Select row, then Ctrl + Shift + + | Mac: Select row, then ⌘ + ⇧ + +
Insert a new row above the selected row.
Pro Tip: Select multiple rows first to insert that many rows at once. Existing formulas and references adjust automatically.
Rows & Columns
Windows: Select column, then Ctrl + Shift + + | Mac: Select column, then ⌘ + ⇧ + +
Insert a new column to the left of the selected column.
Pro Tip: Select multiple columns first to insert that many columns at once.
Rows & Columns
Windows: Select row, then Ctrl + - | Mac: Select row, then ⌘ + -
Delete the selected row(s) and shift remaining rows up.
Pro Tip: Ctrl+Z can undo row deletion. But be careful: deleting rows in shared workbooks can cause conflicts.
Rows & Columns
Windows: Select column, then Ctrl + - | Mac: Select column, then ⌘ + -
Delete the selected column(s) and shift remaining columns left.
Pro Tip: Check for formulas referencing the column before deleting. Deletion causes #REF! errors in dependent formulas.
Rows & Columns
Windows: Ctrl + 9 | Mac: ⌃ + 9
Hide the selected rows from view.
Pro Tip: Hidden rows are still included in formulas. Use SUBTOTAL or AGGREGATE functions if you want to exclude hidden rows from calculations.
Rows & Columns
Windows: Ctrl + Shift + 9 | Mac: ⌃ + ⇧ + 9
Unhide hidden rows within the selection.
Pro Tip: Select the rows above and below the hidden rows first, then use this shortcut. If row 1 is hidden, select all with Ctrl+A first.
Rows & Columns
Windows: Ctrl + 0 (zero) | Mac: ⌃ + 0 (zero)
Hide the selected columns from view.
Pro Tip: Hidden columns are still included in formula references and calculations.
Rows & Columns
Windows: Ctrl + Shift + 0 | Mac: ⌃ + ⇧ + 0
Unhide hidden columns within the selection.
Pro Tip: Select the columns on both sides of the hidden columns first. This shortcut may not work on some systems; use the right-click context menu as a fallback.
Rows & Columns
Windows: Alt + H, O, I | Mac: Via Format menu > Column > AutoFit
Automatically adjust the column width to fit the widest content.
Pro Tip: Select all columns (Ctrl+A) first, then AutoFit to resize all columns at once. You can also double-click the column border in the header.
Rows & Columns
Windows: Alt + H, O, A | Mac: Via Format menu > Row > AutoFit
Automatically adjust the row height to fit the tallest content.
Pro Tip: Useful after enabling Wrap Text to make sure all multiline content is fully visible.
Rows & Columns
Windows: Alt + Shift + Right Arrow | Mac: ⌘ + ⇧ + K
Group the selected rows or columns for collapsible outlining.
Pro Tip: Grouping creates expandable/collapsible sections. Use it for detail rows under summary rows to create a structured report.
Rows & Columns
Windows: Alt + Shift + Left Arrow | Mac: ⌘ + ⇧ + J
Ungroup the selected rows or columns, removing the outline level.
Pro Tip: Select the exact same range that was grouped before ungrouping.
Worksheets
Windows: Shift + F11 | Mac: ⇧ + F11
Insert a new blank worksheet before the active sheet.
Pro Tip: You can also press Alt+H, I, S or click the + icon next to sheet tabs.
Worksheets
Windows: Ctrl + Page Down | Mac: ⌃ + Page Down / ⌥ + Right Arrow
Switch to the next worksheet tab.
Pro Tip: Works cyclically: from the last sheet it wraps around to the first sheet.
Worksheets
Windows: Ctrl + Page Up | Mac: ⌃ + Page Up / ⌥ + Left Arrow
Switch to the previous worksheet tab.
Pro Tip: Combine with Shift to group-select multiple sheets: Ctrl+Shift+Page Up.
Worksheets
Windows: Double-click tab / Alt + H, O, R | Mac: Double-click tab
Rename the active worksheet tab.
Pro Tip: Use short, descriptive names without special characters. Sheet names appear in formulas referencing other sheets.
Worksheets
Windows: Alt + H, D, S | Mac: Via Edit menu or right-click tab
Delete the active worksheet permanently.
Pro Tip: This action cannot be undone with Ctrl+Z. Excel will warn you if the sheet contains data.
Worksheets
Windows: Alt + H, O, M (or right-click tab) | Mac: Right-click tab > Move or Copy
Open the Move or Copy dialog to reorder or duplicate a worksheet.
Pro Tip: Check 'Create a copy' to duplicate the sheet. You can also move sheets between open workbooks using this dialog.
Worksheets
Windows: Ctrl + Click tabs | Mac: ⌘ + Click tabs
Select multiple non-adjacent worksheet tabs for group editing.
Pro Tip: Any changes you make (formatting, data entry) while sheets are grouped apply to all selected sheets simultaneously.
Worksheets
Windows: Right-click tab > Select All Sheets | Mac: Right-click tab > Select All Sheets
Select all worksheet tabs in the workbook for group operations.
Pro Tip: Be very careful: any edits or deletions while all sheets are selected affect every single sheet. Ungroup by clicking any single tab.
Worksheets
Windows: Alt + R, P, S | Mac: Via Review tab > Protect Sheet
Toggle worksheet protection to prevent changes to locked cells.
Pro Tip: Unlock specific cells first (Format Cells > Protection > uncheck Locked) before protecting the sheet so users can still edit those cells.
Worksheets
Windows: Right-click tab > Tab Color | Mac: Right-click tab > Tab Color
Change the color of a worksheet tab for visual organization.
Pro Tip: Use a consistent color-coding system: green for final data, yellow for work-in-progress, red for do-not-edit.
Worksheets
Windows: Right-click tab > Hide | Mac: Right-click tab > Hide
Hide the active worksheet from the tab bar.
Pro Tip: For stronger protection, use VBA to set a sheet as 'xlSheetVeryHidden' which cannot be unhidden from the right-click menu.
Worksheets
Windows: Alt + E, L | Mac: Via Edit menu > Delete Sheet
Delete the active worksheet using the legacy Edit menu shortcut.
Pro Tip: This is a legacy shortcut from older Excel versions that still works. Excel will warn you before deleting a sheet that contains data.
Find & Replace
Windows: Ctrl + F | Mac: ⌘ + F
Open the Find dialog to search for text, numbers, or formulas.
Pro Tip: Click Options in the Find dialog to search within formulas, values, or comments, and to choose whether to search the current sheet or entire workbook.
Find & Replace
Windows: Ctrl + G / F3 (after Find) | Mac: ⌘ + G
Find the next occurrence of the search term.
Pro Tip: After opening Find with Ctrl+F, press Enter or click Find Next to cycle through matches.
Find & Replace
Windows: Ctrl + Shift + F4 | Mac: ⌘ + ⇧ + G
Find the previous occurrence of the search term.
Pro Tip: In the Find dialog, Shift+Enter also searches backwards.
Find & Replace
Windows: Ctrl + H | Mac: ⌃ + H
Open the Find and Replace dialog to find and substitute values.
Pro Tip: Use Replace All carefully. Always check with Find All first to preview all matches. Ctrl+Z can undo a Replace All operation.
Find & Replace
Windows: Ctrl + G / F5 | Mac: ⌃ + G / F5
Open the Go To dialog for navigating to specific cells or named ranges.
Pro Tip: The Go To dialog remembers your previous destinations, making it quick to jump back to previously visited locations.
Find & Replace
Windows: Ctrl + G, then Special (or Alt + S) | Mac: ⌃ + G, then Special
Open Go To Special to select cells by type: blanks, formulas, constants, errors, etc.
Pro Tip: Go To Special > Blanks is incredibly useful. Select your range, Go To Special > Blanks, then type a formula and press Ctrl+Enter to fill all blanks at once.
Find & Replace
Windows: Ctrl + F, then Alt + A (Find All button) | Mac: ⌘ + F, then Find All
List all cells matching the search criteria in a scrollable results list.
Pro Tip: Click any result to jump to that cell. Click column headers in the results list to sort matches. Press Ctrl+A in the results to select all matching cells.
Find & Replace
Windows: Ctrl + H, then Alt + A | Mac: ⌃ + H, then Replace All
Replace all occurrences of the search term at once.
Pro Tip: Excel reports how many replacements were made. If the number is unexpected, immediately Ctrl+Z to undo and refine your search criteria.
Data Tools
Windows: Ctrl + Shift + L | Mac: ⌘ + ⇧ + L
Toggle AutoFilter dropdown arrows on the header row.
Pro Tip: Click inside your data table first. Excel auto-detects the header row. If it gets it wrong, select the correct header row before applying.
Data Tools
Windows: Alt + A, S, A | Mac: Via Data tab > Sort A to Z
Sort the selected column in ascending order (A-Z or smallest to largest).
Pro Tip: Click a single cell in the column you want to sort. Excel will sort the entire data range. Sorting a partial selection can misalign your data.
Data Tools
Windows: Alt + A, S, D | Mac: Via Data tab > Sort Z to A
Sort the selected column in descending order (Z-A or largest to smallest).
Pro Tip: To sort by multiple columns, use the Sort dialog (Alt+A, S, S) to add multiple sort levels.
Data Tools
Windows: Alt + A, S, S | Mac: Via Data tab > Sort
Open the Sort dialog for multi-level sorting with advanced options.
Pro Tip: You can sort by cell color, font color, or cell icon in addition to values. Add multiple levels to break ties.
Data Tools
Windows: Alt + A, V, V | Mac: Via Data tab > Data Validation
Open the Data Validation dialog to set rules for cell input.
Pro Tip: Use data validation to create dropdown lists (Allow: List), restrict numbers to a range, or enforce date boundaries. Add input messages to guide users.
Data Tools
Windows: Alt + A, M | Mac: Via Data tab > Remove Duplicates
Open the Remove Duplicates dialog to delete duplicate rows.
Pro Tip: Always make a backup before removing duplicates. You can choose which columns to compare, so partial duplicates can be detected.
Data Tools
Windows: Alt + A, E | Mac: Via Data tab > Text to Columns
Split text in one column into multiple columns based on a delimiter.
Pro Tip: Text to Columns can also fix data format issues. If dates are imported as text, running Text to Columns (Finish immediately) can convert them to real dates.
Data Tools
Windows: Ctrl + T | Mac: ⌘ + T
Convert a data range into a formatted Excel Table with filter headers.
Pro Tip: Tables auto-expand when you add data below or beside them. Formulas in Tables use structured references that are more readable and maintainable.
Data Tools
Windows: Alt + N, V | Mac: Via Insert tab > PivotTable
Create a PivotTable from the selected data for summarization and analysis.
Pro Tip: Select any cell in your data range before inserting. Using an Excel Table as the source ensures the PivotTable auto-includes new rows.
Data Tools
Windows: Ctrl + Alt + F5 | Mac: ⌘ + ⌥ + F5
Refresh all external data connections in the workbook.
Pro Tip: Use this to update PivotTables, Power Query results, and linked data from external sources.
Data Tools
Windows: Alt + F5 | Mac: ⌥ + F5
Refresh the data connection for the active PivotTable or query.
Pro Tip: Faster than refreshing all connections when you only need to update one data source.
Data Tools
Windows: Alt + Shift + Right Arrow | Mac: ⌘ + ⇧ + K
Group selected items in a PivotTable or group rows/columns in the worksheet.
Pro Tip: In PivotTables, grouping dates lets you summarize by month, quarter, or year. Select date cells and group for automatic date grouping.
Data Tools
Windows: Alt + A, T | Mac: Via Data tab > Filter
Toggle AutoFilter on or off using the Data tab Ribbon shortcut.
Pro Tip: This is the Data tab alternative to Ctrl+Shift+L. Both shortcuts toggle the same filter dropdowns on the header row.
Data Tools
Windows: Alt + A, S, S | Mac: Via Data tab > Sort
Open the full Sort dialog from the Data tab for multi-level sorting.
Pro Tip: The Sort dialog lets you add multiple sort levels, sort by cell color or icon, and choose custom sort orders for specialized sorting needs.
Data Tools
Windows: Alt + Down Arrow | Mac: ⌥ + Down Arrow
Open the AutoFilter dropdown menu for the active column header.
Pro Tip: When the active cell is in a filtered header row, this opens the filter dropdown without needing to click the small arrow button with the mouse.
Function Keys
Windows: F1 | Mac: F1
Open the Excel Help pane.
Pro Tip: Type your question directly in the Help search box. You can also press F1 while in a dialog box to get help specific to that dialog.
Function Keys
Windows: F2 | Mac: F2
Enter edit mode for the active cell with the cursor at the end.
Pro Tip: In edit mode, arrow keys move the cursor within the cell text. Press F2 again to switch to Point mode where arrow keys select cell references.
Function Keys
Windows: F3 | Mac: F3
Paste a defined name into a formula, or open the Paste Name dialog.
Pro Tip: When in a formula, F3 shows a list of all named ranges you can insert at the cursor position.
Function Keys
Windows: F4 | Mac: F4
Repeat the last action performed (outside of formula editing).
Pro Tip: F4 has dual behavior: in a formula it toggles absolute references; outside a formula it repeats the last action like formatting or inserting.
Function Keys
Windows: F6 | Mac: F6
Cycle between the worksheet, Ribbon, task pane, and status bar.
Pro Tip: Useful for keyboard-only navigation. Shift+F6 cycles in the reverse direction.
Function Keys
Windows: F7 | Mac: F7
Run the spelling checker on the active worksheet.
Pro Tip: The spell checker only checks the active sheet by default. Select multiple sheets first (Ctrl+click tabs) to check them all.
Function Keys
Windows: F8 | Mac: F8
Toggle Extend Selection mode. Arrow keys extend the selection without holding Shift.
Pro Tip: Press F8, then use arrow keys to extend the selection hands-free. Press Escape or F8 again to turn it off. Look for 'Extend Selection' in the status bar.
Function Keys
Windows: F9 | Mac: F9
Recalculate all formulas in all open workbooks.
Pro Tip: If calculation mode is Automatic, this has no visible effect. Set to Manual (Formulas > Calculation Options > Manual) for large workbooks to improve performance.
Function Keys
Windows: F10 / Alt | Mac: F10
Activate the menu bar or show KeyTips (letter shortcuts) on the Ribbon.
Pro Tip: Press Alt (or F10) to show letter badges on each Ribbon tab. Then press the letter to activate that tab and see more letter shortcuts.
Function Keys
Windows: F11 | Mac: F11
Create a chart from the selected data on a new chart sheet.
Pro Tip: F11 creates a full-page chart on a separate sheet. Use Alt+F1 to insert an embedded chart on the current worksheet instead.
Function Keys
Windows: Alt + F1 | Mac: ⌥ + F1
Create a chart embedded in the current worksheet from the selected data.
Pro Tip: Excel picks the default chart type (usually a clustered column chart). Change it afterwards by right-clicking the chart > Change Chart Type.
Function Keys
Windows: F12 | Mac: F12
Open the Save As dialog to save with a new name or format.
Pro Tip: This is the fastest way to access Save As without going through the File menu or Backstage view.
Function Keys
Windows: Ctrl + F1 | Mac: ⌘ + ⌥ + R
Collapse or expand the Ribbon to maximize worksheet space.
Pro Tip: When the Ribbon is collapsed, clicking a tab shows it temporarily. It hides again when you click back on the worksheet.
Function Keys
Windows: Alt + F11 | Mac: ⌥ + F11
Open the Visual Basic for Applications (VBA) editor.
Pro Tip: Use the VBA editor to write macros, create custom functions, and automate repetitive tasks. The file must be saved as .xlsm to retain macros.
Function Keys
Windows: Shift + F2 | Mac: ⇧ + F2
Insert or edit a comment (note) on the active cell.
Pro Tip: In Microsoft 365, Shift+F2 adds a Note (formerly Comment). Use the Review tab for threaded Comments with @mentions.
Function Keys
Windows: Ctrl + F5 | Mac: ⌃ + F5
Restore the workbook window size (not maximized, not minimized).
Pro Tip: Use this to resize and position multiple workbook windows side by side for comparison.
Function Keys
Windows: Right-click Status Bar | Mac: Right-click Status Bar
Customize which calculations (Sum, Average, Count, etc.) appear in the status bar.
Pro Tip: Right-click the status bar to toggle Sum, Average, Count, Min, Max, and Numerical Count. These update in real-time for any selection.
Ribbon & Menus
Windows: Alt | Mac: ⌃ + F2 (focus menu bar)
Display letter badges on each Ribbon tab for keyboard-driven navigation.
Pro Tip: After pressing Alt, type the letter shown on a tab (e.g., H for Home) to activate it and reveal shortcuts for every button inside that tab.
Ribbon & Menus
Windows: Alt + F | Mac: ⌃ + F2, then F
Open the File tab (Backstage view) for save, open, print, and export options.
Pro Tip: From Backstage you can access Info for file properties, manage versions, and check for issues before sharing.
Ribbon & Menus
Windows: Alt + H | Mac: ⌃ + F2, then H
Activate the Home tab for clipboard, font, alignment, number format, and cell style commands.
Pro Tip: Home is the most-used tab. Learn its secondary keytips (e.g., Alt+H, B for Borders, Alt+H, F, C for Font Color) to format blazingly fast.
Ribbon & Menus
Windows: Alt + N | Mac: ⌃ + F2, then N
Activate the Insert tab for tables, charts, illustrations, and add-ins.
Pro Tip: Use Alt+N, V for PivotTable, Alt+N, T for Table, and Alt+N, R for Recommended Charts.
Ribbon & Menus
Windows: Alt + P | Mac: ⌃ + F2, then P
Activate the Page Layout tab for margins, orientation, themes, and print area settings.
Pro Tip: Set the print area (Alt+P, R, S) before printing to control exactly which cells appear on paper.
Ribbon & Menus
Windows: Alt + M | Mac: ⌃ + F2, then M
Activate the Formulas tab for function library, name manager, and formula auditing.
Pro Tip: Alt+M, N opens the Name Manager where you can create, edit, and delete named ranges used throughout your workbook.
Ribbon & Menus
Windows: Alt + A | Mac: ⌃ + F2, then A (may vary)
Activate the Data tab for sorting, filtering, data validation, and external connections.
Pro Tip: Alt+A, T toggles AutoFilter. Alt+A, V, V opens Data Validation. These two shortcuts cover most everyday data-tab tasks.
Ribbon & Menus
Windows: Alt + R | Mac: ⌃ + F2, then R
Activate the Review tab for spell check, comments, protection, and change tracking.
Pro Tip: Alt+R, P, S toggles sheet protection. Alt+R, C inserts a comment. These are the most common Review actions.
Ribbon & Menus
Windows: Alt + W | Mac: ⌃ + F2, then W
Activate the View tab for workbook views, freeze panes, gridlines, and window arrangement.
Pro Tip: Alt+W, F, F freezes panes at the current cell — one of the most useful shortcuts for large datasets.
Ribbon & Menus
Windows: Alt + Q | Mac: ⌘ + F (Spotlight-style search)
Jump to the Tell Me / Search box to find any Excel command by typing its name.
Pro Tip: Type a partial command name like 'merge' and Excel shows matching commands you can run instantly without knowing which tab they live on.
Ribbon & Menus
Windows: F10 | Mac: ⌃ + F2
Activate the menu bar or Ribbon, same as pressing Alt.
Pro Tip: F10 and Alt behave identically in Excel for Windows. On Mac, ⌃+F2 moves focus to the menu bar.
Ribbon & Menus
Windows: Shift + F10 | Mac: ⇧ + F10 / ⌃ + Click
Open the context menu for the selected cell, object, or element.
Pro Tip: Faster than reaching for the mouse to right-click. Works everywhere — cells, sheet tabs, chart elements, and Ribbon buttons.
Ribbon & Menus
Windows: Alt + Down Arrow | Mac: ⌥ + Down Arrow
Open the dropdown list in a cell that has data validation or AutoComplete suggestions.
Pro Tip: In a column of repeated values, this shows a pick list of previously entered values — great for consistent data entry without a formal dropdown.
Ribbon & Menus
Windows: Ctrl + F1 | Mac: ⌘ + ⌥ + R
Collapse or expand the Ribbon to gain more screen space for the worksheet.
Pro Tip: When collapsed, click any tab to peek at the Ribbon temporarily; it auto-hides when you click back on the sheet.
Ribbon & Menus
Windows: Alt + Enter | Mac: ⌥ + Enter / ⌃ + ⌥ + Enter
Start a new line inside the same cell (soft return).
Pro Tip: Cells with line breaks automatically enable Wrap Text. Adjust row height if the text is not fully visible.
Ribbon & Menus
Windows: Ctrl + Shift + U | Mac: ⌃ + ⇧ + U
Toggle the formula bar between single-line and expanded multi-line view.
Pro Tip: Expand the formula bar when editing long formulas so you can see the entire expression without scrolling horizontally.
Ribbon & Menus
Windows: Alt + F8 | Mac: ⌥ + F8
Open the Macro dialog to run, edit, or delete saved macros.
Pro Tip: You can assign a keyboard shortcut to any macro from this dialog by clicking Options. Keep macro shortcut letters lowercase to avoid overriding built-in shortcuts.
Ribbon & Menus
Windows: Alt + F11 | Mac: ⌥ + F11
Open the Visual Basic for Applications editor to write or debug macros.
Pro Tip: The VBA Editor is a separate window. Use Alt+Tab to switch between it and Excel. Remember to save as .xlsm to keep your macros.
Charts & Objects
Windows: Alt + F1 | Mac: ⌥ + F1
Create an embedded chart on the active worksheet from the selected data.
Pro Tip: Excel picks a default clustered column chart. Right-click the chart and choose Change Chart Type to switch to bar, line, pie, or any other style.
Charts & Objects
Windows: F11 | Mac: F11
Create a full-page chart on a brand-new chart sheet from the selected data.
Pro Tip: Chart sheets are ideal for presentations because they fill the entire page. You can still move the chart to a regular sheet later via Move Chart.
Charts & Objects
Windows: Ctrl + A (with chart selected) | Mac: ⌘ + A (with chart selected)
Select every element within the active chart at once.
Pro Tip: After selecting all elements, apply a uniform font or size change that affects the entire chart in one step.
Charts & Objects
Windows: Arrow Keys (with element selected) | Mac: Arrow Keys (with element selected)
Nudge the selected chart element (title, legend, plot area) in small increments.
Pro Tip: Click a chart element first to select it, then use arrow keys for pixel-precise positioning instead of dragging with the mouse.
Charts & Objects
Windows: Delete (with element selected) | Mac: Delete (with element selected)
Remove the selected chart element (legend, title, data series, gridlines, etc.).
Pro Tip: Press Ctrl+Z immediately to undo if you accidentally delete the wrong element. Click the chart first, then click the specific element before pressing Delete.
Charts & Objects
Windows: Ctrl + Shift + S | Mac: ⌘ + ⇧ + S
Open the Save As dialog, useful for saving a workbook containing chart changes under a new name.
Pro Tip: Right-click a chart and choose Save as Template to reuse the chart style. Templates are stored in the Charts folder for quick access.
Charts & Objects
Windows: Ctrl + G / F5, then Special > Objects | Mac: ⌃ + G / F5, then Special > Objects
Open the Go To dialog to select all objects (charts, shapes, images) on the sheet.
Pro Tip: After Go To Special > Objects, press Tab to cycle through individual objects. This is the fastest way to find hidden or off-screen objects.
Charts & Objects
Windows: Tab (after selecting an object) | Mac: Tab (after selecting an object)
Move selection to the next object (chart, shape, text box) on the worksheet.
Pro Tip: Press Escape first to deselect any cell, then Tab to start cycling through objects. Shift+Tab cycles in reverse order.
Charts & Objects
Windows: Esc | Mac: Esc
Deselect the currently selected chart or object and return focus to the worksheet.
Pro Tip: Press Esc once to exit editing mode inside a chart, and a second time to deselect the chart entirely.
Charts & Objects
Windows: Enter | Mac: Enter
Enter edit mode for the selected chart or object (e.g., edit text in a shape or enter a chart).
Pro Tip: Press Enter on a selected chart to enter it, then use Tab to cycle between chart elements like title, legend, and axes.
Pivot Tables
Windows: Alt + N + V | Mac: Via Insert tab > PivotTable
Open the Create PivotTable dialog from the currently selected data.
Pro Tip: Convert your data to an Excel Table (Ctrl+T) first so the PivotTable source automatically expands when new rows are added.
Pivot Tables
Windows: Alt + F5 | Mac: ⌥ + F5
Refresh the active PivotTable to reflect changes in the source data.
Pro Tip: Source data changes are never reflected automatically. Build a habit of refreshing after every data update, or use Ctrl+Alt+F5 to refresh all PivotTables at once.
Pivot Tables
Windows: Ctrl + Shift + * (Numpad) | Mac: ⌘ + ⇧ + * (Numpad)
Select the entire PivotTable including headers and values.
Pro Tip: This shortcut selects the current region around the active cell. Make sure your cursor is inside the PivotTable before pressing it.
Pivot Tables
Windows: Alt + Down Arrow | Mac: ⌥ + Down Arrow
Open the filter dropdown for the selected PivotTable field header.
Pro Tip: Use the Search box inside the dropdown to quickly find and filter specific items in fields with many unique values.
Pivot Tables
Windows: Alt + Shift + Right Arrow | Mac: ⌘ + ⇧ + K
Group the selected items in a PivotTable into a custom group.
Pro Tip: Select multiple date cells and group them to automatically create Month, Quarter, or Year groupings for time-based analysis.
Pivot Tables
Windows: Alt + Shift + Left Arrow | Mac: ⌘ + ⇧ + J
Ungroup the selected grouped items in a PivotTable.
Pro Tip: Select a grouped header cell and ungroup to restore the original individual items. Ungrouping dates removes all date-level groupings.
Pivot Tables
Windows: + (Numpad) | Mac: + (Numpad)
Expand the selected grouped row or column in a PivotTable to show detail items.
Pro Tip: Position your cursor on a collapsed group header and press + on the numeric keypad to drill down into that group's details.
Pivot Tables
Windows: - (Numpad) | Mac: - (Numpad)
Collapse the selected expanded group in a PivotTable to hide detail items.
Pro Tip: Collapse groups to create executive-level summaries. Combine with the Outline buttons (1, 2, 3) above the row headers to collapse all groups at once.
Pivot Tables
Windows: Ctrl + - | Mac: ⌘ + -
Hide the selected item from the PivotTable view.
Pro Tip: Hidden items are filtered out, not deleted. Open the field dropdown to re-enable them. This is useful for excluding outliers from your analysis.
Pivot Tables
Windows: Alt + H, B, A | Mac: Via Home tab > Borders > All Borders
Apply borders to all cells in the PivotTable for a cleaner printed appearance.
Pro Tip: PivotTable formatting resets on refresh by default. Go to PivotTable Options > Layout & Format and check 'Preserve cell formatting on update' to keep borders.
Pivot Tables
Windows: Right-click + S (Sort submenu) | Mac: Right-click + Sort
Open the Sort submenu for the selected PivotTable field via the context menu.
Pro Tip: You can sort by values in another field (e.g., sort products by total revenue) using More Sort Options in the context menu.
Pivot Tables
Windows: Ctrl + A | Mac: ⌘ + A
Select all cells within the PivotTable when the cursor is inside it.
Pro Tip: Press Ctrl+A once to select the PivotTable body, press again to include the entire worksheet. Useful before copying PivotTable data.
Pivot Tables
Windows: Space | Mac: Space
Toggle a field's checkbox in the PivotTable Field List panel to add or remove it.
Pro Tip: Use arrow keys to navigate the field list, then Space to toggle. Checked fields are added to the default area (Rows for text, Values for numbers).
Pivot Tables
Windows: Double-click value cell | Mac: Double-click value cell
Double-click a PivotTable value cell to extract its underlying source rows onto a new sheet.
Pro Tip: This creates a new worksheet with all source rows that contribute to that aggregated value. Great for auditing totals or investigating outliers.
Cell Comments / Notes
Windows: Shift + F2 | Mac: ⇧ + F2
Insert a new comment (note) on the active cell, or edit an existing one.
Pro Tip: In Microsoft 365, Shift+F2 creates a Note (the classic yellow sticky). Use the Review tab for modern threaded Comments with @mentions and reply chains.
Cell Comments / Notes
Windows: Alt + R, A (Review tab > Show All Comments) | Mac: Via Review tab > Show All Comments
Toggle the visibility of all comments and notes on the worksheet.
Pro Tip: Showing all comments is useful for a quick review pass. They may overlap — resize or reposition individual comment boxes by dragging their borders.
Cell Comments / Notes
Windows: Ctrl + Home, then Tab (navigate to next comment indicator) | Mac: Via Review tab > Next
Navigate to the next comment or note on the worksheet.
Pro Tip: Use the Review tab > Next / Previous buttons for reliable comment-to-comment navigation, especially in large worksheets.
Cell Comments / Notes
Windows: Shift + Tab (from comment navigation) | Mac: Via Review tab > Previous
Navigate to the previous comment or note on the worksheet.
Pro Tip: Combine with Show All Comments to visually scan the sheet while stepping backwards through the comment list.
Cell Comments / Notes
Windows: Delete (with comment selected in Show All mode) | Mac: Delete (with comment selected)
Delete the currently selected comment or note.
Pro Tip: You can also right-click a cell with a comment indicator and choose Delete Comment / Delete Note from the context menu.
Cell Comments / Notes
Windows: Alt + R, D | Mac: Via Review tab > Delete
Delete the comment or note on the active cell using the Review tab.
Pro Tip: To delete all comments at once, select all commented cells with Ctrl+Shift+O, then use this command to remove them in bulk.
Cell Comments / Notes
Windows: Esc | Mac: Esc
Close the comment editing box and return focus to the cell.
Pro Tip: Your comment text is saved automatically when you press Esc. There is no separate save step for comments.
VBA / Macros
Windows: Alt + F11 | Mac: ⌥ + F11
Open the Visual Basic for Applications editor in a separate window.
Pro Tip: The Developer tab must be enabled in Ribbon settings to see VBA-related buttons, but Alt+F11 works regardless of whether the tab is visible.
VBA / Macros
Windows: Alt + F8 | Mac: ⌥ + F8
Open the Macro dialog to run, step into, edit, or delete macros.
Pro Tip: Click Options in this dialog to assign a Ctrl+letter shortcut to any macro for one-press execution.
VBA / Macros
Windows: F5 (in VBA Editor) | Mac: F5 (in VBA Editor)
Run the current macro or Sub procedure from the VBA Editor.
Pro Tip: If your cursor is inside a Sub, F5 runs that Sub. If it is in a module with multiple Subs, a dialog asks which one to run.
VBA / Macros
Windows: F8 (in VBA Editor) | Mac: F8 (in VBA Editor)
Execute the macro one line at a time, stepping into called procedures.
Pro Tip: Step Into is essential for debugging. Watch the yellow highlight move line by line and use the Locals or Watch window to inspect variable values.
VBA / Macros
Windows: Shift + F8 (in VBA Editor) | Mac: ⇧ + F8 (in VBA Editor)
Execute the next line but step over any called Sub or Function without entering it.
Pro Tip: Use Step Over when you trust a called Sub works correctly and only want to debug the calling procedure.
VBA / Macros
Windows: Ctrl + F8 (in VBA Editor) | Mac: ⌃ + F8 (in VBA Editor)
Run the macro from the current position and pause at the line where the cursor is placed.
Pro Tip: Faster than setting a breakpoint when you want a one-time stop. Place your cursor on the target line and press Ctrl+F8.
VBA / Macros
Windows: F9 (in VBA Editor) | Mac: F9 (in VBA Editor)
Set or remove a breakpoint on the current line in the VBA Editor.
Pro Tip: Breakpoints appear as red dots in the margin. Execution pauses before that line runs, letting you inspect the state with the Immediate or Locals window.
VBA / Macros
Windows: Ctrl + Break | Mac: ⌘ + . (period) / ⌃ + Break
Interrupt a running macro and enter break mode.
Pro Tip: If a macro is stuck in an infinite loop, Ctrl+Break is your emergency stop. You can then inspect variables or click Reset to end execution entirely.
VBA / Macros
Windows: Ctrl + G (in VBA Editor) | Mac: ⌃ + G (in VBA Editor)
Open the Immediate Window in the VBA Editor for executing ad-hoc VBA statements.
Pro Tip: Type ?variableName to print a variable's value, or run any VBA statement directly. Use Debug.Print in your code to output values here during execution.
VBA / Macros
Windows: Ctrl + R (in VBA Editor) | Mac: ⌃ + R (in VBA Editor)
Open or focus the Project Explorer pane in the VBA Editor.
Pro Tip: The Project Explorer shows all open workbooks, their sheets, modules, and class modules. Double-click any item to open its code window.
Drag & Drop
Windows: Drag cell border | Mac: Drag cell border
Move the selected cells to a new location by dragging the selection border.
Pro Tip: Hover over the thick border of a selected range until the cursor becomes a four-headed arrow, then drag. Existing content at the destination is overwritten.
Drag & Drop
Windows: Ctrl + Drag cell border | Mac: ⌥ + Drag cell border
Copy the selected cells to a new location by holding Ctrl (or Option on Mac) while dragging.
Pro Tip: A small + icon appears on the cursor to indicate copy mode. Release the mouse button before releasing the modifier key.
Drag & Drop
Windows: Shift + Drag cell border | Mac: ⇧ + Drag cell border
Move cells and insert them between existing cells, shifting neighbors to make room.
Pro Tip: This avoids overwriting data at the destination. Watch for the green I-beam indicator showing where the cells will be inserted.
Drag & Drop
Windows: Right-click + Drag cell border | Mac: Right-click + Drag cell border (⌃ + Click + Drag)
Drag cells using the right mouse button to get a context menu with move, copy, and paste-special options on drop.
Pro Tip: The context menu includes options like Copy Here as Values Only, Link Here, and Shift Down — more control than a standard drag.
Drag & Drop
Windows: Drag fill handle (small square at bottom-right of selection) | Mac: Drag fill handle (small square at bottom-right of selection)
Extend a pattern or series by dragging the fill handle down, up, or across.
Pro Tip: Enter two values to establish a pattern (e.g., 1 and 2, or Jan and Feb), select both, then drag the fill handle. Excel detects and continues the series.
Dialog Box Navigation
Windows: Tab | Mac: Tab
Move focus to the next control (text box, button, checkbox) in a dialog box.
Pro Tip: Tab order follows a logical flow through the dialog. Use it to fill out dialogs entirely with the keyboard, no mouse needed.
Dialog Box Navigation
Windows: Shift + Tab | Mac: ⇧ + Tab
Move focus to the previous control in a dialog box.
Pro Tip: If you Tab past a field, Shift+Tab takes you back without cycling through the entire dialog.
Dialog Box Navigation
Windows: Enter | Mac: Enter / Return
Activate the default button (usually OK or Apply) in a dialog box.
Pro Tip: The default button has a darker border. Pressing Enter activates it from anywhere in the dialog, so be careful not to confirm prematurely.
Dialog Box Navigation
Windows: Esc | Mac: Esc / ⌘ + .
Close the dialog box without applying any changes.
Pro Tip: Esc is equivalent to clicking Cancel. No changes are saved. Some dialogs have multiple levels — press Esc multiple times to back out.
Dialog Box Navigation
Windows: Alt + underlined letter | Mac: Not available (use Tab)
Jump to and activate a control whose label has an underlined accelerator letter.
Pro Tip: Look for the underlined character in each label. Alt+that letter selects the control instantly. This works in almost every Windows dialog.
Dialog Box Navigation
Windows: Space | Mac: Space
Check or uncheck the focused checkbox in a dialog box.
Pro Tip: Tab to the checkbox first, then press Space. This also works for radio buttons — Space selects the focused radio option.
Dialog Box Navigation
Windows: Arrow Keys | Mac: Arrow Keys
Move between options in a radio button group or items in a list box.
Pro Tip: Arrow keys both move focus and select in radio groups. In list boxes, arrow keys move focus — press Space to select if multi-select is enabled.
Dialog Box Navigation
Windows: Ctrl + Tab | Mac: ⌃ + Tab
Switch to the next tab page within a multi-tab dialog box (e.g., Format Cells).
Pro Tip: The Format Cells dialog (Ctrl+1) has six tabs. Use Ctrl+Tab to cycle Number → Alignment → Font → Border → Fill → Protection.
Dialog Box Navigation
Windows: Ctrl + Shift + Tab | Mac: ⌃ + ⇧ + Tab
Switch to the previous tab page within a multi-tab dialog box.
Pro Tip: Combine with Ctrl+Tab to quickly flip back and forth between dialog tabs while comparing settings.
Dialog Box Navigation
Windows: F4 | Mac: F4
Repeat the last action performed within a dialog or dropdown, where supported.
Pro Tip: F4 also opens the address bar dropdown in Open/Save dialogs, letting you quickly navigate to a different folder.
Navigation
Windows: End, then Arrow Key | Mac: End, then Arrow Key
Activate End mode, then press an arrow key to jump to the next boundary between filled and empty cells in that direction.
Pro Tip: End mode is indicated in the status bar. Press End once (you will see 'End Mode'), then press an arrow key. It behaves similarly to Ctrl+Arrow but follows different boundary rules at edges.
Navigation
Windows: End, then Home | Mac: End, then Home
Jump to the last used cell in the current row when End mode is active.
Pro Tip: Press End, then Home to navigate to the intersection of the last used column and the current row. Useful for finding the rightmost extent of data in your row.
Navigation
Windows: End, then End | Mac: End, then End
Jump to the very last used cell on the worksheet (equivalent to Ctrl+End) via End mode.
Pro Tip: This is an alternative to Ctrl+End for reaching the lower-right corner of the used range.
Navigation
Windows: Ctrl + G, then Alt + S | Mac: ⌃ + G, then Special
Open the Go To Special dialog to navigate to cells by type such as blanks, formulas, constants, or errors.
Pro Tip: Use this to jump to all formula cells, all blank cells, or all cells with errors in one step. It is one of the most powerful navigation tools for auditing.
Navigation
Windows: Tab / Shift + Tab | Mac: Tab / ⇧ + Tab
On a protected worksheet, Tab moves to the next unlocked cell and Shift+Tab moves to the previous unlocked cell.
Pro Tip: When designing input forms on protected sheets, unlock only the input cells so users can Tab through them in order without accidentally editing labels or formulas.
Navigation
Windows: Ctrl + Up Arrow (with Scroll Lock on) | Mac: Scroll Lock + Up Arrow
Scroll the view up by one row without changing the active cell when Scroll Lock is enabled.
Pro Tip: Enable Scroll Lock first, then use Ctrl+Arrow keys to pan the worksheet while your active cell stays fixed. Great for viewing distant data while keeping your place.
Selection
Windows: Shift + Click | Mac: ⇧ + Click
Extend the current selection from the active cell to the clicked cell, creating a rectangular range.
Pro Tip: Click a cell to set the anchor, then Shift+Click a distant cell to select the entire rectangular range between them without dragging.
Selection
Windows: Shift + F8 | Mac: ⇧ + F8
Toggle Add to Selection mode, allowing you to select non-adjacent cells with arrow keys without holding Ctrl.
Pro Tip: After pressing Shift+F8, the status bar shows 'Add to Selection'. Use arrow keys and Shift+Arrow to add ranges hands-free. Press Escape to exit the mode.
Selection
Windows: Ctrl + Shift + Space | Mac: ⌃ + ⇧ + Space
Select all drawing objects, charts, and shapes on the active worksheet.
Pro Tip: Useful for quickly deleting all shapes or formatting all objects at once. Works only when an object is already selected.
Selection
Windows: Ctrl + G, Alt + S, then V | Mac: ⌃ + G, Special, then Data Validation
Select all cells that have data validation rules applied via Go To Special.
Pro Tip: Choose 'All' to select every cell with data validation, or 'Same' to select only cells matching the active cell's validation rule.
Selection
Windows: Ctrl + Shift + End (from row start) | Mac: ⌃ + ⇧ + End
Select from the current cell to the last used cell, extending the selection to the bottom-right corner of the used range.
Pro Tip: Start from column A of a row, then use this shortcut to select everything from that row down to the last used cell in the worksheet.
Selection
Windows: Ctrl + Home, then Ctrl + Shift + End | Mac: ⌃ + Home, then ⌃ + ⇧ + End
Select the entire used range from A1 to the last used cell by combining two navigation shortcuts.
Pro Tip: This two-step shortcut ensures you select exactly the used range, which is especially helpful for copying data without including empty rows below.
Selection
Windows: Ctrl + G, Alt + S, then O | Mac: ⌃ + G, Special, then Conditional Formats
Select all cells that have conditional formatting rules applied via Go To Special.
Pro Tip: Choose 'All' to find every conditionally formatted cell, or 'Same' to find cells with the same conditional rules as the active cell.
Selection
Windows: Ctrl + G, Alt + S, then O (Constants) | Mac: ⌃ + G, Special, then Constants
Select all cells containing constant values (not formulas) via Go To Special.
Pro Tip: After selecting constants, you can apply formatting to distinguish hand-entered data from calculated values. Combine with sub-options for numbers, text, or logicals only.
Editing & Data Entry
Windows: Ctrl + Enter (with range selected) | Mac: ⌃ + Return (with range selected)
Enter the same value or formula into all selected cells simultaneously.
Pro Tip: Select a range first, type your value, then press Ctrl+Enter. Every cell in the selection gets the same content. This is much faster than copy-paste for filling large areas.
Editing & Data Entry
Windows: Alt + Down Arrow | Mac: ⌥ + Down Arrow
Display a pick list of all unique values previously entered in the current column.
Pro Tip: This autocomplete pick list only appears for text entries in a contiguous column without blank cells above. It helps maintain consistent data entry without formal data validation.
Editing & Data Entry
Windows: Ctrl + Delete (in edit mode) | Mac: ⌃ + Delete
While editing a cell, delete all characters from the cursor position to the end of the line.
Pro Tip: This only works in edit mode (press F2 first). It is useful for quickly removing the tail end of a long cell entry without selecting it first.
Editing & Data Entry
Windows: Ctrl + A (in edit mode) | Mac: ⌘ + A (in edit mode)
Select all content within the active cell while in edit mode.
Pro Tip: Press F2 to enter edit mode, then Ctrl+A to select all text. Useful when you want to replace the entire cell content with new text while staying in edit mode.
Editing & Data Entry
Windows: Alt + N, U (Insert > Symbol) | Mac: Via Insert menu > Symbol
Open the Symbol dialog to insert special characters like trademark, copyright, or mathematical symbols.
Pro Tip: For frequently used symbols, note their Alt code (e.g., Alt+0169 for copyright). The Symbol dialog also shows recently used symbols for quick re-insertion.
Editing & Data Entry
Windows: Ctrl + K | Mac: ⌘ + K
Open the Insert Hyperlink dialog to create a link to a URL, file, email, or location within the workbook.
Pro Tip: Link to a specific cell in another sheet by choosing 'Place in This Document' and specifying the sheet and cell reference.
Editing & Data Entry
Windows: Ctrl + Alt + V, then E, Enter | Mac: ⌘ + ⌃ + V, then Transpose
Paste copied data with rows and columns swapped (transposed).
Pro Tip: Copy a row of headers and transpose-paste to convert them into a column, or vice versa. The transposed data is pasted as static values unless you check Paste Link.
Editing & Data Entry
Windows: Type first letters, then Enter to accept | Mac: Type first letters, then Return to accept
Excel suggests a completion based on existing entries in the column. Press Enter to accept or keep typing to override.
Pro Tip: AutoComplete only suggests entries from the same column and only if there is one unique match. Press Delete to reject the suggestion and continue typing.
Formatting
Windows: Ctrl + 6 | Mac: ⌃ + 6
Cycle through display modes for objects: show all, show placeholders, or hide all objects on the worksheet.
Pro Tip: Hiding objects speeds up scrolling and screen redrawing in worksheets with many charts, shapes, or images. Press repeatedly to cycle through the three states.
Formatting
Windows: Ctrl + 8 | Mac: ⌃ + 8
Show or hide the outline symbols (expand/collapse buttons and level bars) for grouped rows and columns.
Pro Tip: Hiding outline symbols gives a cleaner view while keeping the groups intact. The grouping still works; only the visual controls are hidden.
Formatting
Windows: Ctrl + = (equals) | Mac: ⌘ + = (equals)
Toggle subscript formatting on the selected text within a cell.
Pro Tip: You must be in edit mode (F2) with text selected to apply subscript. It cannot be applied to an entire cell in one click; select the specific characters first.
Formatting
Windows: Ctrl + Shift + = (equals) | Mac: ⌘ + ⇧ + = (equals)
Toggle superscript formatting on the selected text within a cell.
Pro Tip: Select specific characters in edit mode before applying. Superscript is commonly used for footnote markers, exponents, and ordinal suffixes like 1st, 2nd.
Formatting
Windows: Alt + H, L, R | Mac: Via Home tab > Conditional Formatting > Manage Rules
Open the Conditional Formatting Rules Manager to view, edit, and prioritize all formatting rules.
Pro Tip: Rules are evaluated in order from top to bottom. Use the Move Up/Move Down buttons to change priority. Check 'Stop If True' to prevent lower-priority rules from applying.
Formatting
Windows: Alt + H, B, P | Mac: Via Home tab > Borders > Top Border
Apply a top border to the selected cells using the Ribbon Borders menu.
Pro Tip: Top and bottom borders are commonly used in financial statements to indicate subtotals and grand totals.
Formatting
Windows: Alt + H, B, O | Mac: Via Home tab > Borders > Bottom Border
Apply a bottom border to the selected cells using the Ribbon Borders menu.
Pro Tip: A single bottom border under totals is standard accounting format. Use double bottom border (Alt+H, B, B) for grand totals.
Formatting
Windows: Alt + H, B, B | Mac: Via Home tab > Borders > Double Bottom Border
Apply a double-line bottom border to the selected cells, commonly used for grand totals.
Pro Tip: In financial reporting, a single underline means subtotal and a double underline means final total. This shortcut applies the standard accounting double border.
Formatting
Windows: Alt + H, E, F | Mac: Via Home tab > Clear > Clear Formats
Remove all formatting from the selected cells while keeping the content intact.
Pro Tip: This resets font, fill color, borders, number format, and alignment back to defaults. Use it when formatting has become inconsistent and you want a clean slate.
Formatting
Windows: Ctrl + 1, then Number tab | Mac: ⌘ + 1, then Number tab
Open the Format Cells dialog directly to the Number tab for custom number formatting codes.
Pro Tip: Custom format codes like #,##0.00;(#,##0.00);'-' display positives normally, negatives in parentheses, and zeros as a dash. Master format codes for professional reports.
Formulas
Windows: Ctrl + Shift + U | Mac: ⌃ + ⇧ + U
Toggle the formula bar between single-line and expanded multi-line view for editing long formulas.
Pro Tip: When working with complex nested formulas, expand the formula bar to see the entire expression. You can also drag the bottom edge of the formula bar to resize it manually.
Formulas
Windows: Shift + F9 | Mac: ⇧ + F9
Recalculate only the formulas on the active worksheet instead of all open workbooks.
Pro Tip: When calculation is set to Manual and you have many workbooks open, Shift+F9 is much faster than F9 because it recalculates only the current sheet.
Formulas
Windows: Ctrl + Shift + { (brace) | Mac: ⌃ + ⇧ + { (brace)
Select all cells that are directly or indirectly referenced by formulas in the current selection (all levels of precedents).
Pro Tip: Unlike Ctrl+[ which only shows direct precedents, this shortcut traces the entire chain of cells feeding into your formula across multiple levels.
Formulas
Windows: Ctrl + Shift + } (brace) | Mac: ⌃ + ⇧ + } (brace)
Select all cells that directly or indirectly depend on the active cell across all levels.
Pro Tip: Use this to understand the full downstream impact of changing a cell. Every formula that ultimately relies on this cell will be highlighted.
Formulas
Windows: Alt + M, A, A | Mac: Via Formulas tab > Remove Arrows
Remove all precedent and dependent trace arrows from the worksheet.
Pro Tip: After auditing formulas with Trace Precedents and Trace Dependents, use this to clean up the arrow overlays and return to a normal view.
Rows & Columns
Windows: Alt + H, I, R | Mac: Via Home tab > Insert > Insert Sheet Rows
Insert a new row above the active cell using the Home tab Ribbon command.
Pro Tip: This inserts a row without needing to select the entire row first. Excel inserts above the active cell's row and shifts existing rows down.
Rows & Columns
Windows: Alt + H, D, R | Mac: Via Home tab > Delete > Delete Sheet Rows
Delete the row containing the active cell using the Home tab Ribbon command.
Pro Tip: This deletes the entire row of the active cell without needing to select the full row first. Be cautious: this removes all data in that row across all columns.
Rows & Columns
Windows: Alt + H, I, C | Mac: Via Home tab > Insert > Insert Sheet Columns
Insert a new column to the left of the active cell using the Home tab Ribbon command.
Pro Tip: The new column is inserted to the left of the active cell's column. Formulas referencing columns to the right adjust automatically.
Rows & Columns
Windows: Alt + H, D, C | Mac: Via Home tab > Delete > Delete Sheet Columns
Delete the column containing the active cell using the Home tab Ribbon command.
Pro Tip: Check for formulas referencing the column before deleting. Deletion creates #REF! errors in any formula that pointed to the removed column.
Rows & Columns
Windows: Alt + H, O, W | Mac: Via Format menu > Column Width
Open the Column Width dialog to set an exact column width in character units.
Pro Tip: The default column width is 8.43 characters. Set a specific width for uniform columns, especially when formatting printable reports or aligning data across sheets.
Rows & Columns
Windows: Alt + H, O, H | Mac: Via Format menu > Row Height
Open the Row Height dialog to set an exact row height in points.
Pro Tip: The default row height is 15 points. Set a uniform height for all rows by selecting the entire sheet (Ctrl+A) before opening this dialog.
Rows & Columns
Windows: Alt + H, O, D | Mac: Via Format menu > Default Width
Open a dialog to change the default column width for the entire worksheet.
Pro Tip: This affects all columns that have not been manually resized. Useful for standardizing the layout of a new worksheet before entering data.
Worksheets
Windows: Alt + H, O, T | Mac: Via Format menu > Tab Color
Open the Tab Color picker to change the color of the active worksheet tab via the Ribbon.
Pro Tip: Color-code your sheets by function: blue for raw data, green for calculations, yellow for summaries, and red for sheets that should not be edited.
Worksheets
Windows: Alt + H, O, U, H | Mac: Via Format menu > Sheet > Unhide
Open the Unhide dialog to restore a hidden worksheet to the tab bar.
Pro Tip: Only one sheet can be unhidden at a time through this dialog. For sheets hidden via VBA as 'Very Hidden', you must use the VBA Editor to change their Visible property.
Worksheets
Windows: Alt + R, P, W | Mac: Via Review tab > Protect Workbook
Toggle protection on the workbook structure to prevent adding, deleting, moving, or renaming sheets.
Pro Tip: Workbook protection is separate from sheet protection. Protect the workbook structure to lock the sheet layout, and protect individual sheets to lock cell editing.
Find & Replace
Windows: Ctrl + J (in Find/Replace dialog) | Mac: ⌃ + J (in Find/Replace dialog)
Represent a line break character (Alt+Enter) in the Find or Replace field of the Find and Replace dialog.
Pro Tip: To remove all in-cell line breaks, open Replace (Ctrl+H), press Ctrl+J in the Find field (it looks blank but contains the line break), put a space in Replace, and click Replace All.
Find & Replace
Windows: Ctrl + F, then click Options | Mac: ⌘ + F, then Options
Open the Find dialog with expanded options for searching by format, within formulas or values, across sheets or workbook.
Pro Tip: Click the Format button next to Find What to search for cells with specific formatting such as a particular fill color, font, or number format.
Ribbon & Menus
Windows: Alt + L | Mac: ⌃ + F2, then L
Activate the Developer tab for macros, VBA, form controls, and XML tools.
Pro Tip: The Developer tab is hidden by default. Enable it via File > Options > Customize Ribbon > check Developer. Once visible, Alt+L activates it instantly.
Ribbon & Menus
Windows: Alt + J, T | Mac: Via Table Design tab
Activate the Table Design contextual tab when an Excel Table is selected.
Pro Tip: Contextual tabs only appear when a specific object (table, chart, image) is selected. Click inside the table first, then use Alt+J to access its design and layout options.
Ribbon & Menus
Windows: Alt + J, C | Mac: Via Chart Design tab
Activate the Chart Design contextual tab when a chart is selected.
Pro Tip: Select the chart first to reveal the Chart Design and Format contextual tabs. Use Alt+J, C for Chart Design or Alt+J, A for Chart Format.
Ribbon & Menus
Windows: Alt + 1 | Mac: Not available
Execute the first command on the Quick Access Toolbar.
Pro Tip: Customize the Quick Access Toolbar with your most-used commands. Alt+1 through Alt+9 run the first nine commands, giving you up to nine custom one-press shortcuts.
Ribbon & Menus
Windows: Alt + 2 | Mac: Not available
Execute the second command on the Quick Access Toolbar.
Pro Tip: Add Format Painter, Paste Values, or any frequently used command to the QAT position 2 for a fast Alt+2 shortcut.
Ribbon & Menus
Windows: Alt + 3 | Mac: Not available
Execute the third command on the Quick Access Toolbar.
Pro Tip: Popular QAT additions include Camera tool, Speak Cells, and Custom Sort. Each one gets an Alt+number shortcut automatically.
Data Tools
Windows: Alt + D, P | Mac: Via Data menu (older versions)
Open the legacy PivotTable and PivotChart Wizard for step-by-step PivotTable creation.
Pro Tip: This legacy wizard still works in modern Excel and offers options not available in the standard PivotTable dialog, such as creating a PivotTable from multiple consolidation ranges.
Data Tools
Windows: Alt + A, N | Mac: Via Data tab > Consolidate
Open the Consolidate dialog to combine data from multiple ranges into a single summary.
Pro Tip: Consolidate can sum, average, or count data from multiple worksheets or workbooks. It is an alternative to PivotTables for combining identically structured data sets.
Data Tools
Windows: Alt + A, W, G | Mac: Via Data tab > What-If Analysis > Goal Seek
Open Goal Seek to find the input value needed to achieve a specific formula result.
Pro Tip: Goal Seek adjusts one input cell to make a formula reach a target value. For example, find what sales price gives you a target profit margin.
Data Tools
Windows: Alt + A, W, S | Mac: Via Data tab > What-If Analysis > Scenario Manager
Open Scenario Manager to create and switch between named sets of input values.
Pro Tip: Define scenarios like 'Best Case', 'Worst Case', and 'Most Likely' with different input values. Generate a summary report comparing all scenarios side by side.
Data Tools
Windows: Alt + A, Q | Mac: Via Data tab > Advanced Filter
Open the Advanced Filter dialog for complex filtering with multiple criteria and output to a different location.
Pro Tip: Advanced Filter can extract unique records, use OR conditions across columns, and filter data to a separate range. Set up a criteria range on the same sheet above your data.
Data Tools
Windows: Alt + A, B | Mac: Via Data tab > Subtotal
Open the Subtotal dialog to insert automatic subtotals and group outlines in a sorted data list.
Pro Tip: Sort your data by the grouping column first. Subtotals inserts SUM, COUNT, AVERAGE, or other functions at each group break and creates collapsible outline levels.
Function Keys
Windows: Ctrl + F9 | Mac: ⌃ + F9
Minimize the active workbook window within the Excel application.
Pro Tip: This minimizes the workbook window within Excel, not the Excel application itself. Use Windows+Down Arrow to minimize the Excel application window.
Function Keys
Windows: Ctrl + F10 | Mac: ⌃ + F10
Maximize or restore the active workbook window within the Excel application.
Pro Tip: Toggle between maximized and restored window size. When restored, you can position multiple workbook windows side by side within Excel.
Function Keys
Windows: Shift + F11 | Mac: ⇧ + F11
Insert a new blank worksheet before the currently active sheet.
Pro Tip: The new sheet is named Sheet followed by the next available number. Double-click the tab immediately after insertion to give it a meaningful name.
Function Keys
Windows: Ctrl + F3 | Mac: ⌃ + F3
Open the Name Manager dialog to create, edit, and delete named ranges and constants.
Pro Tip: Named ranges defined here can be used in formulas across the entire workbook. Use descriptive names like 'TaxRate' or 'SalesData' for self-documenting formulas.
Function Keys
Windows: Ctrl + F5 | Mac: ⌃ + F5
Restore the workbook window to its previous non-maximized size and position.
Pro Tip: After restoring, you can drag the window edges to resize it and position it alongside other workbooks for side-by-side comparison.
Function Keys
Windows: Shift + F3 | Mac: ⇧ + F3
Open the Insert Function dialog to search for and insert any Excel function by name or description.
Pro Tip: The search box accepts natural language queries like 'count cells that contain text' and suggests matching functions like COUNTIF or COUNTA.
Function Keys
Windows: F5, then Alt + S, then V | Mac: F5, then Special > Visible cells only
Open Go To Special and select only the visible cells in a filtered range, skipping hidden rows.
Pro Tip: This is critical before copying filtered data. Without selecting visible cells only, pasting may include data from hidden rows, corrupting your copied output.
Data Cleaning · beginner
Quickly strip duplicate rows from a dataset without writing any formulas.
How to: Select your data range → Data tab → Remove Duplicates → choose columns to compare → OK.
Data Cleaning · beginner
Remove leading, trailing, and extra interior spaces from text — a common problem with imported data.
How to: =TRIM(A1) → 'Hello World ' becomes 'Hello World'
Data Cleaning · beginner
Let Excel detect a pattern from your examples and auto-fill the rest of the column.
How to: Type the desired result in the first cell next to your data → start typing the second → press Ctrl+E or Data → Flash Fill.
Data Cleaning · intermediate
Strip invisible control characters (line breaks, tabs, etc.) that cause matching and sorting issues.
How to: =CLEAN(A1) removes characters 0–31 from the ASCII table.
Data Cleaning · intermediate
Separate a full name column into first and last name columns using formulas.
How to: First: =LEFT(A1,FIND(" ",A1)-1) Last: =MID(A1,FIND(" ",A1)+1,LEN(A1))
Data Cleaning · beginner
Replace specific text within a cell without affecting other content — more precise than Find & Replace.
How to: =SUBSTITUTE(A1,"NYC","New York City") replaces every occurrence of 'NYC'.
Data Cleaning · intermediate
Fix numbers stored as text (green triangle indicator) so they work in calculations.
How to: Method 1: Select cells → click warning icon → 'Convert to Number'. Method 2: =VALUE(A1) Method 3: Paste Special → Multiply by 1.
Data Cleaning · intermediate
Strip Alt+Enter line breaks that mess up CSV exports and data processing.
How to: =SUBSTITUTE(A1,CHAR(10)," ") replaces each line break with a space.
Data Cleaning · beginner
Standardize text case across an entire column quickly.
How to: =PROPER(A1) → 'john doe' becomes 'John Doe' =UPPER(A1) → 'JOHN DOE' =LOWER(A1) → 'john doe'
Data Cleaning · intermediate
Use * and ? wildcards in Find & Replace to match patterns and clean messy data in bulk.
How to: Ctrl+H → Find: *(* → Replace with: (blank) — removes anything in parentheses. * matches any sequence; ? matches a single character.
Data Cleaning · beginner
Split a single column into multiple columns using a delimiter like comma, tab, or space.
How to: Select column → Data → Text to Columns → Delimited → choose delimiter → Finish.
Data Cleaning · intermediate
Extract a known-length portion of a cell to discard unwanted prefixes, suffixes, or padding.
How to: Remove first 3 chars: =MID(A1,4,LEN(A1)) Keep last 4 chars: =RIGHT(A1,4) Keep first 5 chars: =LEFT(A1,5)
Formula Tricks · intermediate
Convert TRUE/FALSE into 1/0 inside formulas so they can be used in arithmetic.
How to: =SUMPRODUCT(--(A1:A10>50)) counts how many values exceed 50.
Formula Tricks · advanced
Enter classic CSE array formulas that evaluate arrays internally — essential in Excel 2019 and earlier.
How to: To sum the product of two ranges: type =SUM(A1:A10*B1:B10) then press Ctrl+Shift+Enter. Curly braces {} appear in the formula bar.
Formula Tricks · intermediate
Reference the entire result of a dynamic array formula using the spill-range operator (#).
How to: If A1 contains =UNIQUE(B:B), reference all results with =SORT(A1#). The # tells Excel 'use every cell this formula spills into'.
Formula Tricks · beginner
Replace cryptic cell references with meaningful names to make formulas self-documenting.
How to: Select B2:B100 → Name Box (left of formula bar) → type 'Revenue' → Enter. Now use =SUM(Revenue) instead of =SUM(B2:B100).
Formula Tricks · intermediate
Use * and ? wildcards inside criteria to match partial text in SUMIFS, COUNTIFS, AVERAGEIFS, etc.
How to: =COUNTIFS(A:A,"*apple*") counts cells containing the word 'apple' anywhere. =SUMIFS(B:B,A:A,"Dept-??") sums where column A matches 'Dept-' followed by exactly 2 characters.
Formula Tricks · advanced
Use intentional circular references with iterative calculation to create running totals or convergent models.
How to: File → Options → Formulas → Enable Iterative Calculation → set max iterations (e.g., 100). Then =A1+B1 in A1 accumulates B1's value each calculation cycle.
Formula Tricks · beginner
Use XLOOKUP for simpler, more flexible lookups — it searches any direction and returns any column.
How to: =XLOOKUP(E1,A:A,C:C,"Not Found") looks up E1 in column A and returns the corresponding value from column C.
Formula Tricks · intermediate
Assign intermediate results to names inside a formula to avoid repeated calculations and improve readability.
How to: =LET(total, SUM(A1:A10), avg, total/10, IF(avg>50,"High","Low"))
Formula Tricks · advanced
Create your own named functions without VBA using LAMBDA — then call them like built-in functions.
How to: Define in Name Manager: Name = TAXED, Refers To = =LAMBDA(amount, rate, amount * (1 + rate)). Usage: =TAXED(A1, 0.08)
Formula Tricks · beginner
Wrap lookup and division formulas to display friendly messages instead of #N/A, #DIV/0!, etc.
How to: =IFERROR(VLOOKUP(A1,Data,2,0),"Not found") =IFNA(XLOOKUP(A1,B:B,C:C),"—") catches only #N/A.
Formula Tricks · intermediate
Look up a value and return a column to its LEFT — something VLOOKUP cannot do.
How to: =INDEX(A:A, MATCH(E1, C:C, 0)) finds E1 in column C and returns the same-row value from column A.
Formula Tricks · beginner
Join multiple cell values into one string with a chosen delimiter, optionally ignoring blanks.
How to: =TEXTJOIN(", ", TRUE, A1:A10) joins all non-empty values with a comma and space.
Formula Tricks · intermediate
Chain dynamic-array functions to build auto-updating filtered, sorted, deduplicated lists without helper columns.
How to: =SORT(UNIQUE(FILTER(A2:A100, B2:B100>1000))) returns a sorted list of unique names where column B exceeds 1000.
Formula Tricks · intermediate
Sum with multiple criteria in older Excel versions without needing Ctrl+Shift+Enter.
How to: =SUMPRODUCT((A2:A100="East")*(B2:B100="Q1")*C2:C100) sums column C where region is East AND quarter is Q1.
Formatting Hacks · intermediate
Display raw digits like 5551234567 as a formatted phone number without changing the underlying value.
How to: Select cells → Ctrl+1 → Number tab → Custom → Type: (000) 000-0000 Result: (555) 123-4567
Formatting Hacks · intermediate
Apply formatting based on a formula for logic that built-in rules cannot handle — like highlighting an entire row.
How to: Select data range → Conditional Formatting → New Rule → 'Use a formula' → =$C1>1000 → set fill color. The $ on C locks the column; the row stays relative to format the whole row.
Formatting Hacks · intermediate
Auto-shade every other row using a conditional formatting formula — works even when rows are added or deleted.
How to: Select range → Conditional Formatting → New Rule → Formula: =MOD(ROW(),2)=0 → set fill color.
Formatting Hacks · beginner
Display blank cells instead of 0 values without deleting the data.
How to: Select cells → Ctrl+1 → Custom → Type: 0;-0;"" The three sections are: positive;negative;zero. An empty string for zero hides it.
Formatting Hacks · intermediate
Show thousands as 'K' and millions as 'M' while keeping the actual value intact for calculations.
How to: Thousands: 0.0,"K" → 1500 displays as 1.5K Millions: 0.0,,"M" → 2500000 displays as 2.5M
Formatting Hacks · intermediate
Embed color directives in a custom number format to auto-color positive, negative, and zero values.
How to: Custom format: [Green]#,##0;[Red]-#,##0;[Gray]0 Positive numbers show green, negatives red, zeros gray.
Formatting Hacks · beginner
Display units like 'kg', 'lbs', or '%' as part of the number format so the cell remains a real number.
How to: Custom format: #,##0" kg" → 150 displays as '150 kg' but SUM still works. For percentage without multiplying by 100: 0"%"
Formatting Hacks · beginner
Add in-cell visual indicators to make patterns in numeric data immediately obvious.
How to: Select range → Home → Conditional Formatting → Data Bars (or Icon Sets / Color Scales) → pick a style.
Formatting Hacks · beginner
Control exactly how dates display using format codes — show day names, abbreviated months, or ISO format.
How to: dddd, mmmm d, yyyy → Monday, March 17, 2026 dd-mmm-yy → 17-Mar-26 yyyy-mm-dd → 2026-03-17
Formatting Hacks · beginner
Make long text visible in cells and create clean header spans across columns.
How to: Wrap text: select cells → Home → Wrap Text. Merge: select cells → Home → Merge & Center. Shortcut for wrap: Alt+H, W.
Formatting Hacks · beginner
Copy formatting (colors, borders, number formats) from one range to another without overwriting the data.
How to: Copy source cells → select target → Ctrl+Alt+V → select 'Formats' → OK. Alternative: use the Format Painter brush on the Home tab.
Navigation Speed · beginner
Instantly jump to the edge of a contiguous data region instead of scrolling cell by cell.
How to: Ctrl+↓ jumps to the last filled cell in the column (or the next filled cell after a gap). Ctrl+→ does the same horizontally. Add Shift to select while jumping.
Navigation Speed · beginner
Click the Name Box (left of the formula bar), type a cell address or named range, and press Enter to jump there instantly.
How to: Click Name Box → type Z1000 → Enter. You are now at cell Z1000. Type 'Revenue' (a named range) → Enter to jump to that range.
Navigation Speed · beginner
Switch between showing formula results and showing the formulas themselves — great for auditing.
How to: Press Ctrl+` (backtick, usually above Tab). All cells show their formulas. Press again to return to normal view.
Navigation Speed · beginner
View two parts of the same worksheet simultaneously without opening a second window.
How to: View tab → Split. Drag the split bars to position them. Each pane scrolls independently.
Navigation Speed · beginner
Keep row and/or column headers visible while scrolling through large datasets.
How to: Click the cell below and to the right of what you want frozen → View → Freeze Panes. To freeze just row 1: View → Freeze Top Row.
Navigation Speed · beginner
Jump to cell A1 or to the last used cell in the worksheet in one keystroke.
How to: Ctrl+Home → jumps to A1. Ctrl+End → jumps to the intersection of the last used row and column.
Navigation Speed · intermediate
Select only specific cell types — blanks, formulas, constants, errors, visible cells — in one step.
How to: Ctrl+G → Special → choose 'Blanks' → OK. All blank cells in the selection are now selected. Use 'Formulas' to select only cells containing formulas.
Navigation Speed · beginner
Move between worksheet tabs without touching the mouse.
How to: Ctrl+Page Down → moves to the next sheet tab. Ctrl+Page Up → moves to the previous sheet tab.
Navigation Speed · beginner
Pin your most-used commands to the Quick Access Toolbar for one-click access, each with an Alt+number shortcut.
How to: Click the dropdown arrow on the QAT → More Commands → add your favorites. Alt+1 triggers the first QAT button, Alt+2 the second, etc.
Data Validation · advanced
Create a second dropdown whose options change based on the selection in a first dropdown.
How to: 1. Create named ranges for each category (e.g., Fruits = Apple,Banana; Vegetables = Carrot,Pea). 2. First dropdown: Data Validation → List → Fruits,Vegetables. 3. Second dropdown: List → =INDIRECT(A1) where A1 holds the first dropdown's value.
Data Validation · intermediate
Block users from entering a value that already exists in the column.
How to: Select the input range → Data → Data Validation → Custom → Formula: =COUNTIF(A:A,A1)<=1 Set an error alert: 'This value already exists!'
Data Validation · beginner
Replace the generic error popup with a clear, user-friendly message explaining what input is expected.
How to: Data Validation → Error Alert tab → Style: Stop → Title: 'Invalid Entry' → Error message: 'Please enter a number between 1 and 100.'
Data Validation · beginner
Restrict cells to accept only valid dates within a specified range.
How to: Data Validation → Allow: Date → between → Start: 1/1/2020 → End: 12/31/2030. Invalid dates and text are rejected automatically.
Data Validation · beginner
Show a helpful tooltip when a cell is selected to guide users on what to enter — no error needed.
How to: Data Validation → Input Message tab → Title: 'Department' → Message: 'Select your department from the dropdown.'
Data Validation · beginner
Limit a cell to accept only whole numbers or decimals within a defined range.
How to: Data Validation → Allow: Whole number → between → Minimum: 0 → Maximum: 999. For decimals: Allow: Decimal → greater than: 0.
Data Validation · beginner
Limit the number of characters a user can type into a cell — useful for codes, IDs, or abbreviations.
How to: Data Validation → Allow: Text length → less than or equal to → Maximum: 10.
Data Validation · beginner
Create a dropdown list from a range of cells — the dropdown auto-updates if you use a Table as the source.
How to: Data Validation → Allow: List → Source: =$E$1:$E$20 (or =TableName[Column]). Check 'In-cell dropdown' to display the arrow.
Data Validation · intermediate
Visually highlight cells that currently violate their validation rules — useful after data imports or rule changes.
How to: Data tab → Data Validation dropdown arrow → Circle Invalid Data. Red circles appear around offending cells. To clear: Validation dropdown → Clear Validation Circles.
Pivot Table Tricks · intermediate
Create custom calculations inside a pivot table without adding helper columns to your source data.
How to: Click inside pivot → PivotTable Analyze → Fields, Items & Sets → Calculated Field → Name: 'Profit Margin' → Formula: =Profit/Revenue.
Pivot Table Tricks · beginner
Automatically group a date field into months, quarters, or years without helper columns.
How to: Right-click any date in the pivot → Group → select Months, Quarters, Years → OK. The pivot replaces individual dates with the chosen groupings.
Pivot Table Tricks · intermediate
Convert raw numbers in a pivot table to percentages of the row total, column total, or grand total.
How to: Right-click a value cell → Show Values As → % of Grand Total (or % of Row Total, % of Column Total, etc.).
Pivot Table Tricks · beginner
Add clickable filter buttons that make it easy for anyone to interact with a pivot table.
How to: Click inside pivot → PivotTable Analyze → Insert Slicer → select fields → OK. Click slicer buttons to filter. Hold Ctrl for multi-select. Connect one slicer to multiple pivots via Report Connections.
Pivot Table Tricks · beginner
Add a visual date filter that lets users slide through time periods — days, months, quarters, or years.
How to: PivotTable Analyze → Insert Timeline → select date field → OK. Use the dropdown to switch between Days, Months, Quarters, Years. Drag to select a range.
Pivot Table Tricks · intermediate
Set pivot tables to refresh whenever the workbook is opened, so they always reflect the latest data.
How to: Right-click pivot → PivotTable Options → Data tab → check 'Refresh data when opening the file'. Manual refresh anytime: right-click → Refresh, or Alt+F5.
Pivot Table Tricks · beginner
Double-click any value cell in a pivot table to see the source rows that make up that number.
How to: Double-click a cell showing '$12,500' → Excel creates a new sheet listing every row from the source data that contributed to that total.
Chart Tricks · intermediate
Plot two series with vastly different scales (e.g., revenue and units) on the same chart using a secondary Y-axis.
How to: Right-click the smaller series → Format Data Series → Secondary Axis. Optionally change that series to a line chart: right-click → Change Series Chart Type.
Chart Tricks · intermediate
Make chart titles update automatically based on cell values — perfect for dashboards with filters.
How to: Click the chart title → go to the formula bar → type = then click the cell you want to link (e.g., =Sheet1!$B$1) → Enter.
Chart Tricks · beginner
Insert miniature line, column, or win/loss charts inside a single cell to show trends at a glance.
How to: Insert → Sparklines → Line → Data Range: B2:M2 → Location: N2 → OK. Repeat for each row, or fill down. Customize via the Sparkline Design tab.
Chart Tricks · intermediate
Create simple horizontal bar charts inside cells using the REPT function and a block character — no chart object needed.
How to: =REPT("█", A1/10) where A1 contains a value like 80 → displays 8 block characters. Adjust the divisor to control bar length.
Chart Tricks · advanced
Add error bars to chart series to show confidence intervals, standard deviation, or custom ranges.
How to: Click series → Chart Design → Add Chart Element → Error Bars → More Options → choose Standard Deviation, Percentage, or Custom.
Chart Tricks · intermediate
Add a trendline to a chart series and extend it forward to visualize future projections.
How to: Right-click a chart series → Add Trendline → choose Linear, Exponential, etc. → check 'Display equation' and 'Forward: 3 periods'.
Chart Tricks · beginner
Copy a chart as a static image so it does not change when pasted into other documents.
How to: Click chart → Home → Copy dropdown → Copy as Picture → choose 'As shown on screen' and 'Picture' → OK. Paste into Word, PowerPoint, or email.
Data Cleaning · beginner
Strip out unwanted characters like dashes, slashes, or symbols from cells without affecting the rest of the text.
How to: =SUBSTITUTE(SUBSTITUTE(A1,"-",""),"/","") removes all dashes and slashes. Nest multiple SUBSTITUTE calls for multiple characters.
Data Cleaning · beginner
Force text-stored numbers into real numbers using a simple multiplication trick — faster than VALUE().
How to: In a helper column: =A1*1 or =A1+0. Alternatively, type 1 in a blank cell → Copy → select text-number range → Paste Special → Multiply.
Data Cleaning · intermediate
Eliminate in-cell line breaks that cause problems when exporting data or using VLOOKUP.
How to: =CLEAN(A1) removes all non-printable characters including line breaks. =SUBSTITUTE(A1,CHAR(10),"") removes only line-feed characters (Alt+Enter breaks).
Formula Tricks · advanced
Force a formula to evaluate as an array in Excel 2019 and earlier — essential when SUMPRODUCT is not enough.
How to: Type =MAX(IF(A1:A100="East",B1:B100)) then press Ctrl+Shift+Enter. Curly braces {} appear in the formula bar, confirming array entry.
Formula Tricks · beginner
Replace cryptic references like $B$2:$B$5000 with descriptive names to make complex formulas understandable.
How to: Formulas tab → Name Manager → New → Name: SalesData → Refers To: =Sheet1!$B$2:$B$5000. Now use =SUM(SalesData) instead of =SUM($B$2:$B$5000).
Formula Tricks · intermediate
Use * and ? wildcards inside SUMIF/COUNTIF criteria to match partial text patterns.
How to: =COUNTIF(A:A,"*laptop*") counts cells containing 'laptop' anywhere. =SUMIF(A:A,"Dept-??",B:B) sums B where A matches 'Dept-' followed by exactly 2 characters.
Formula Tricks · advanced
Use intentional circular references to create counters, running totals, or timestamps that update each calculation.
How to: Enable: File → Options → Formulas → check Iterative Calculation. In A1: =A1+1 — each time the sheet recalculates, A1 increments by 1. For a running total: =A1+B1 where B1 has new data each cycle.
Formula Tricks · advanced
Build sheet and cell references from text strings so you can pull data from variable sheet names.
How to: If A1 contains the sheet name 'Q1Sales': =INDIRECT("'"&A1&"'!B10") returns the value from cell B10 on the Q1Sales sheet.
Formula Tricks · intermediate
Use SUMPRODUCT with Boolean arrays to perform multi-condition sums, counts, and averages without helper columns or CSE.
How to: Count: =SUMPRODUCT((A2:A100="East")*(B2:B100>1000)) Weighted Avg: =SUMPRODUCT((A2:A100="East")*C2:C100)/SUMPRODUCT((A2:A100="East")*1) No Ctrl+Shift+Enter needed.
Formatting Hacks · beginner
Remove the gridlines on a specific sheet for a cleaner dashboard look without affecting other sheets.
How to: View tab → uncheck 'Gridlines'. This only affects the active sheet. Alternative: Page Layout tab → Sheet Options → uncheck Gridlines View.
Formatting Hacks · intermediate
Display up/down arrows (or any symbol) next to numbers to visually indicate positive or negative changes.
How to: Custom format: ▲ #,##0;▼ -#,##0;0 Positive shows ▲ 500, negative shows ▼ -200, zero shows 0. Combine with color: [Green]▲ #,##0;[Red]▼ #,##0;0
Formatting Hacks · intermediate
Copy the same conditional formatting rules to identical ranges on multiple sheets at once.
How to: Set up conditional formatting on one sheet. Select the formatted range → Format Painter → hold Ctrl and click multiple sheet tabs → click the same range on the last sheet. Alternatively: group sheets first (Ctrl+click tabs), then apply formatting.
Formatting Hacks · beginner
Toggle strikethrough formatting instantly with a keyboard shortcut — great for marking completed tasks.
How to: Select cells → press Ctrl+5 to apply strikethrough. Press Ctrl+5 again to remove it. Works on entire cells or selected text within a cell.
Navigation Speed · beginner
Instantly switch the entire sheet to show all formulas at once instead of their results — essential for auditing.
How to: Press Ctrl+` (backtick key, usually above Tab). Every cell displays its formula. Columns auto-widen. Press Ctrl+` again to return to normal view.
Data Validation · intermediate
Use custom formulas in Data Validation to create rules that go beyond the built-in options.
How to: Only future dates: Custom formula → =A1>TODAY() Only even numbers: =MOD(A1,2)=0 Only email-like input: =ISNUMBER(FIND("@",A1))
Pivot Table Tricks · advanced
Share a single data cache between multiple pivot tables to save memory and keep them synchronized.
How to: Create the first pivot normally. For the second: Insert → PivotTable → check 'Use this workbook's Data Model' or in older versions, use the PivotTable Wizard (Alt+D, P) and select 'Use an existing pivot table'.
Pivot Table Tricks · intermediate
Transform pivot values into running totals, ranks, percent differences, and other secondary calculations.
How to: Right-click a value → Show Values As → Running Total In → select date field. Other options: Rank Smallest to Largest, % Difference From Previous, % of Parent Total.
Pivot Table Tricks · advanced
Understand the difference: Calculated Fields create new measures; Calculated Items create new members within an existing field.
How to: Calculated Field: PivotTable Analyze → Fields, Items & Sets → Calculated Field → 'Margin' = Profit/Revenue. Calculated Item: click a field → Calculated Item → 'Combined' = East + West.
Chart Tricks · intermediate
Build tiny comparison bar charts entirely inside cells using the REPT function and Unicode block characters.
How to: =REPT("▓",A1/5)&" "&A1 creates a shaded bar followed by the value. Use a fixed-width font like Consolas for consistent bar widths across rows.
Chart Tricks · intermediate
Make charts auto-expand when new data is added by basing them on an Excel Table instead of a fixed range.
How to: Convert data to a Table: Ctrl+T. Create a chart from the Table. When you add rows to the Table, the chart automatically includes the new data — no need to update ranges manually.
Chart Tricks · beginner
Create progress bar visuals inside cells using Data Bar conditional formatting — no chart object needed.
How to: Enter percentages (0% to 100%) → select range → Conditional Formatting → Data Bars → pick a style. For cleaner bars: More Rules → uncheck 'Show Bar Only' or check it to hide the number.
Print Tricks · beginner
Repeat header rows or columns on every printed page so readers always know what each column or row represents.
How to: Page Layout tab → Print Titles → Rows to repeat at top: $1:$1 (or select your header rows). Columns to repeat at left: $A:$A for row labels. Click Print Preview to verify.
Print Tricks · beginner
Scale an entire worksheet to fit on a single printed page — no manual margin or font adjustments needed.
How to: Page Layout tab → Scale to Fit → Width: 1 page → Height: 1 page. Alternative: File → Print → Settings → 'Fit Sheet on One Page'.
Print Tricks · intermediate
Add page numbers, file path, date, and custom text to printed page headers and footers.
How to: Insert tab → Text → Header & Footer (or Page Layout → Page Setup → Header/Footer tab). Use codes: &[Page] for page number, &[Pages] for total, &[File] for filename, &[Path] for full path, &[Date] for current date.
Print Tricks · beginner
Print only a specific range of cells instead of the entire worksheet — perfect for printing just a summary table.
How to: Select the range you want to print → File → Print → Settings dropdown → choose 'Print Selection'. To make it permanent: Page Layout → Print Area → Set Print Area.
Print Tricks · intermediate
Add a 'DRAFT', 'CONFIDENTIAL', or custom watermark to printed pages using the header image trick.
How to: Insert tab → Header & Footer → click in the header area → Header & Footer Elements → Picture → select your watermark image. Click in the header text and add &[Picture]. Resize by clicking Format Picture.
Performance · intermediate
Stop Excel from recalculating after every edit — dramatically speeds up workbooks with thousands of formulas.
How to: Formulas tab → Calculation Options → Manual. Press F9 to recalculate when needed. Ctrl+Shift+F9 forces a full recalculation. Remember to switch back to Automatic when done editing.
Performance · intermediate
Shrink oversized workbooks by removing unused rows/columns, excessive conditional formatting, and uncompressed images.
How to: 1. Delete unused rows: Ctrl+Shift+End to find last used cell → delete everything beyond it. 2. Clear conditional formatting on unused ranges: Conditional Formatting → Clear Rules. 3. Compress images: select image → Format → Compress Pictures → 150 ppi.
Performance · advanced
Avoid volatile functions (NOW, TODAY, INDIRECT, OFFSET) that force Excel to recalculate every cell on every change.
How to: Replace =OFFSET(A1,0,0,COUNTA(A:A),1) with =INDEX(A:A,1):INDEX(A:A,COUNTA(A:A)). Replace =INDIRECT("Sheet"&B1&"!A1") with XLOOKUP or structured references where possible. Use a single helper cell for TODAY() instead of repeating it in every formula.
Performance · beginner
Replace verbose IF(ISERROR()) patterns with the cleaner and faster IFERROR function.
How to: Slow: =IF(ISERROR(VLOOKUP(A1,Data,2,0)),"Not Found",VLOOKUP(A1,Data,2,0)) Fast: =IFERROR(VLOOKUP(A1,Data,2,0),"Not Found") The fast version evaluates VLOOKUP only once.
Performance · beginner
Fix display glitches, flickering, or freezing by turning off hardware graphics acceleration in Excel.
How to: File → Options → Advanced → scroll to Display → check 'Disable hardware graphics acceleration' → OK. Restart Excel for the change to take effect.
Collaboration · intermediate
Lock a worksheet to prevent edits while still letting users filter and sort data using AutoFilter.
How to: First apply AutoFilter to your data (Data → Filter). Then: Review → Protect Sheet → enter a password → check 'Use AutoFilter' and optionally 'Sort' → OK.
Collaboration · intermediate
Enable change tracking to see who changed what, when, and optionally accept or reject each change.
How to: Review tab → Track Changes → Highlight Changes → check 'Track changes while editing'. Use 'Accept/Reject Changes' to review each edit. In Excel 365: changes are tracked automatically via version history on OneDrive/SharePoint.
Collaboration · beginner
Use threaded comments to have conversations within cells and @mention teammates to notify them.
How to: Right-click a cell → New Comment (in Excel 365) → type your message → use @Name to mention a colleague. They will receive an email notification with a link to the cell.
Collaboration · beginner
Share your workbook with a link that allows viewing but not editing — ideal for distributing reports.
How to: Save the file to OneDrive or SharePoint → File → Share → 'People you specify can view' → Copy Link. Recipients can view in the browser without an Excel license and cannot modify the original.
Collaboration · beginner
Edit the same workbook simultaneously with teammates in real time using AutoSave and co-authoring.
How to: Save the file to OneDrive or SharePoint → toggle AutoSave ON (top-left corner). Share the file with teammates. When multiple people open it, you see colored cursors showing who is editing where.
Advanced · advanced
Use Power Query to connect to data sources, clean, reshape, and load data — all without writing a single formula.
How to: Data tab → Get Data → choose source (CSV, database, web, etc.) → Power Query Editor opens. Apply transformations: remove columns, filter rows, split columns, merge queries → Close & Load.
Advanced · intermediate
Understand how dynamic array formulas spill results into multiple cells and how to reference the entire spill range.
How to: =UNIQUE(A2:A100) entered in one cell spills unique values downward. =SORT(C1#) references the entire spill range from C1. =COUNTA(C1#) counts all spilled values dynamically.
Advanced · advanced
Create custom worksheet functions using LAMBDA — no macros, no VBA, just pure formula logic saved as a name.
How to: Formulas → Name Manager → New → Name: CELSIUS → Refers To: =LAMBDA(f, (f-32)*5/9) Usage: =CELSIUS(98.6) returns 37. LAMBDA supports recursion and can be passed to MAP, REDUCE, SCAN.
Advanced · advanced
Create named ranges that automatically expand as data grows — essential for charts and validation lists.
How to: Formulas → Name Manager → New → Name: DynamicList Refers To: =OFFSET(Sheet1!$A$1,0,0,COUNTA(Sheet1!$A:$A),1) Or the non-volatile version: =Sheet1!$A$1:INDEX(Sheet1!$A:$A,COUNTA(Sheet1!$A:$A))
Advanced · intermediate
Take a live, linked picture of any range and place it anywhere — updates automatically when the source changes.
How to: Add Camera to QAT: File → Options → Quick Access Toolbar → 'All Commands' → Camera → Add. Select the source range → click Camera → click where you want the snapshot. The image is live-linked.
Advanced · beginner
Convert data ranges to Tables for auto-expanding formulas, structured references, and built-in formatting.
How to: Select data → Ctrl+T → check 'My table has headers' → OK. Formulas automatically use structured references: =SUM(Table1[Revenue]). New rows are automatically included in formulas and charts.
Advanced · advanced
Embed hardcoded arrays directly in formulas using curly-brace syntax for multi-value lookups and calculations.
How to: =SUM(LARGE(A1:A10,{1,2,3})) sums the top 3 values. =CHOOSE({1,2},A1:A10,B1:B10) creates a two-column array from A and B. Commas separate columns; semicolons separate rows.
Advanced · intermediate
Save different combinations of filters, column widths, hidden rows, and print settings as named views you can switch between instantly.
How to: Set up your desired view (filters, hidden columns, zoom, etc.) → View tab → Custom Views → Add → name it 'Manager Report' → OK. Switch views: Custom Views → select name → Show.
Advanced · intermediate
Find the input value needed to reach a desired formula result — Excel works backwards from the answer you want.
How to: Data tab → What-If Analysis → Goal Seek → Set cell: B10 (the formula) → To value: 10000 → By changing cell: B3 (the input) → OK. Excel iterates until B10 equals 10000.
Advanced · advanced
Optimize a formula result by changing multiple input cells simultaneously, subject to constraints — far more powerful than Goal Seek.
How to: Enable: File → Options → Add-ins → Manage: Excel Add-ins → Go → check Solver → OK. Data tab → Solver → Set Objective: profit cell → To: Max → By Changing: input cells → Add Constraints → Solve.
Getting Started
The VB Editor (VBE) is where you write, edit, and debug all VBA code. Alt+F11 is the fastest way to open it from any workbook.
' Press Alt+F11 to open the Visual Basic Editor.
' Or: Developer tab → Visual Basic.
' If the Developer tab is not visible:
' File → Options → Customize Ribbon → check "Developer".
Pro Tip: Press Ctrl+G inside the VBE to open the Immediate Window — you can run single lines of code there for quick testing.
Getting Started
Modules are containers for your VBA code. Standard modules hold general-purpose macros that are not tied to a specific sheet or workbook event.
' In the VB Editor:
' 1. Right-click your workbook name in the Project Explorer.
' 2. Insert → Module.
' A new module (e.g., Module1) appears where you can write Sub/Function procedures.
Pro Tip: Keep related macros in the same module and use descriptive module names (right-click → Rename) like 'modDataClean' or 'modReports'.
Getting Started
F5 runs the macro your cursor is currently inside. Alt+F8 opens the macro dialog where you can pick any public Sub to run.
Sub HelloWorld()
MsgBox "Hello, World!"
End Sub
' To run:
' 1. Place cursor inside the Sub → press F5.
' 2. Or: Developer tab → Macros → select → Run.
' 3. Or: Alt+F8 → select macro → Run.
Pro Tip: You can assign a keyboard shortcut to any macro via Alt+F8 → Options.
Getting Started
The macro recorder translates your clicks and keystrokes into VBA code. It is an excellent way to learn VBA syntax for unfamiliar operations.
' 1. Developer tab → Record Macro (or View → Macros → Record Macro).
' 2. Name the macro, choose where to store it, optionally assign a shortcut.
' 3. Perform the actions you want to automate.
' 4. Developer tab → Stop Recording.
' 5. Open VBE (Alt+F11) to see the generated code.
Pro Tip: Recorded macros use Select and Activate excessively. Clean up the code by removing unnecessary .Select calls and working with ranges directly.
Getting Started
Buttons provide a user-friendly way to trigger macros without requiring users to know shortcut keys or navigate the macro dialog.
' Method 1 — Form Control Button:
' Developer → Insert → Button (Form Control) → draw on sheet → assign macro.
'
' Method 2 — Shape:
' Insert → Shapes → draw shape → right-click → Assign Macro → select.
'
' Method 3 — Via VBA (add a button programmatically):
Sub AddButton()
Dim btn As Button
Set btn = ActiveSheet.Buttons.Add(100, 50, 120, 30)
btn.Caption = "Run Report"
btn.OnAction = "MyReportMacro"
End Sub
Pro Tip: Form Control buttons are simpler and more reliable than ActiveX buttons. Use shapes for a more polished look.
Getting Started
Standard .xlsx files strip out VBA code on save. You must use .xlsm (or .xlsb) to preserve macros.
' When saving a workbook with VBA code:
' File → Save As → choose "Excel Macro-Enabled Workbook (*.xlsm)".
'
' Via VBA:
Sub SaveAsMacroEnabled()
ThisWorkbook.SaveAs Filename:="C:\Reports\MyFile.xlsm", _
FileFormat:=xlOpenXMLWorkbookMacroEnabled
End Sub
Pro Tip: If macros disappear after saving, you likely saved as .xlsx by accident. Re-save as .xlsm to restore them.
Cells & Ranges
Range("A1").Value reads the current value of cell A1. You can also use Cells(1, 1).Value where 1,1 means row 1, column 1.
Sub ReadCell()
Dim val As Variant
val = Range("A1").Value
MsgBox "Cell A1 contains: " & val
End Sub
Pro Tip: Avoid .Select when you just need to read or write — directly reference the range for cleaner, faster code.
Cells & Ranges
Assigning to .Value writes data into cells. You can write strings, numbers, dates, or even an entire row at once using an Array.
Sub WriteCells()
Range("A1").Value = "Hello"
Range("B1").Value = 42
Range("C1").Value = Date
Range("A2:D2").Value = Array("Name", "Age", "City", "Score")
End Sub
Pro Tip: Writing an entire array to a range in one operation is vastly faster than writing cell by cell in a loop.
Cells & Ranges
For Each iterates over every cell in the specified range. This example converts non-empty cells to uppercase.
Sub LoopRange()
Dim cell As Range
For Each cell In Range("A1:A100")
If cell.Value <> "" Then
cell.Value = UCase(cell.Value)
End If
Next cell
End Sub
Pro Tip: For large ranges, read the data into a Variant array first, process it, then write it back — this avoids thousands of individual cell accesses.
Cells & Ranges
This starts at the very bottom of column A and moves up (xlUp) to find the first non-empty cell — giving you the last row with data.
Sub FindLastRow()
Dim lastRow As Long
lastRow = Cells(Rows.Count, "A").End(xlUp).Row
MsgBox "Last used row in column A: " & lastRow
End Sub
Pro Tip: Always use Long (not Integer) for row variables. Excel has over 1 million rows, which overflows the Integer type.
Cells & Ranges
The Copy method with Destination is a one-line copy-paste. PasteSpecial gives you control over what is pasted (values, formats, formulas, etc.).
Sub CopyPasteRange()
' Copy with paste
Range("A1:D10").Copy Destination:=Range("F1")
' Paste values only (no formulas or formatting)
Range("A1:D10").Copy
Range("F1").PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
End Sub
Pro Tip: Set Application.CutCopyMode = False after PasteSpecial to clear the marching ants and free the clipboard.
Cells & Ranges
ClearContents removes data but keeps formatting. ClearFormats strips formatting but keeps data. Clear removes both plus comments and hyperlinks.
Sub ClearCells()
Range("A1:D100").ClearContents ' Values and formulas only
Range("A1:D100").ClearFormats ' Formatting only
Range("A1:D100").Clear ' Everything
End Sub
Pro Tip: Use ClearContents when you want to preserve column widths, borders, and conditional formatting while resetting data.
Cells & Ranges
The Find method searches a range for a value and returns the first matching cell as a Range object, or Nothing if not found.
Sub FindValue()
Dim found As Range
Set found = Range("A:A").Find(What:="SearchTerm", LookIn:=xlValues, LookAt:=xlWhole)
If Not found Is Nothing Then
MsgBox "Found at: " & found.Address
Else
MsgBox "Value not found."
End If
End Sub
Pro Tip: Find remembers its last settings (LookIn, LookAt, etc.) from both VBA and the UI. Always specify all parameters explicitly to avoid surprises.
Cells & Ranges
Resize changes the dimensions of a range reference. Offset moves the starting point by a specified number of rows and columns.
Sub DynamicRanges()
Dim lastRow As Long
lastRow = Cells(Rows.Count, 1).End(xlUp).Row
' Select from A1 to the last row, 4 columns wide
Dim dataRange As Range
Set dataRange = Range("A1").Resize(lastRow, 4)
' Offset: shift the range down 1 row and right 2 columns
Dim shifted As Range
Set shifted = dataRange.Offset(1, 2)
MsgBox "Data range: " & dataRange.Address & vbCrLf & _
"Shifted range: " & shifted.Address
End Sub
Pro Tip: Combine Resize and Offset to dynamically target headers (Offset 0,0 Resize 1,cols) or data-only areas (Offset 1,0 Resize rows-1,cols).
Worksheets
Worksheets.Add creates a new sheet. The After parameter places it at the end. Assigning .Name immediately renames it.
Sub AddSheet()
Dim ws As Worksheet
Set ws = ThisWorkbook.Worksheets.Add(After:=ThisWorkbook.Sheets(ThisWorkbook.Sheets.Count))
ws.Name = "NewReport"
End Sub
Pro Tip: Wrap the Name assignment in an error handler in case a sheet with that name already exists — duplicate names cause a runtime error.
Worksheets
DisplayAlerts = False suppresses the confirmation dialog. On Error Resume Next prevents a crash if the sheet does not exist.
Sub DeleteSheet()
Application.DisplayAlerts = False
On Error Resume Next
ThisWorkbook.Sheets("OldData").Delete
On Error GoTo 0
Application.DisplayAlerts = True
End Sub
Pro Tip: Always restore DisplayAlerts to True afterward, ideally in an error-handling block, so other warnings are not silently swallowed.
Worksheets
The .Name property renames a sheet. The .Copy method duplicates it; After/Before controls placement. The copy becomes the ActiveSheet.
Sub RenameAndCopy()
' Rename
ThisWorkbook.Sheets("Sheet1").Name = "Summary"
' Copy to end of workbook
ThisWorkbook.Sheets("Summary").Copy After:=ThisWorkbook.Sheets(ThisWorkbook.Sheets.Count)
' The copy is now the active sheet; rename it
ActiveSheet.Name = "Summary_Backup"
End Sub
Pro Tip: When copying sheets with formulas, references may break if they point to the original sheet. Check and update after copying.
Worksheets
xlSheetHidden hides the sheet but users can right-click to unhide. xlSheetVeryHidden makes it invisible even from the UI — only VBA can bring it back.
Sub HideUnhide()
' Hide (user can unhide via right-click)
Sheets("Data").Visible = xlSheetHidden
' Very Hidden (only unhideable via VBA)
Sheets("Config").Visible = xlSheetVeryHidden
' Unhide
Sheets("Data").Visible = xlSheetVisible
Sheets("Config").Visible = xlSheetVisible
End Sub
Pro Tip: Use xlSheetVeryHidden for configuration or lookup sheets you do not want users to see or accidentally modify.
Worksheets
For Each iterates over the Worksheets collection. Use ws to reference cells, ranges, and properties on each sheet without activating it.
Sub LoopSheets()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
' Example: add a header to cell A1 of every sheet
ws.Range("A1").Value = "Report: " & ws.Name
ws.Range("A1").Font.Bold = True
Next ws
End Sub
Pro Tip: This is the foundation for batch operations like formatting all sheets, consolidating data, or generating a table of contents.
Worksheets
Attempting to reference a non-existent sheet throws an error. This function uses On Error Resume Next to safely check and returns True/False.
Function SheetExists(sheetName As String) As Boolean
Dim ws As Worksheet
On Error Resume Next
Set ws = ThisWorkbook.Sheets(sheetName)
On Error GoTo 0
SheetExists = Not ws Is Nothing
End Function
Sub TestSheetExists()
If SheetExists("Summary") Then
MsgBox "Sheet exists!"
Else
MsgBox "Sheet not found."
End If
End Sub
Pro Tip: Use this helper function before any Add or Delete operation to avoid runtime errors from duplicates or missing sheets.
Workbooks
Workbooks.Open opens a file and returns a Workbook object you can store in a variable for further manipulation.
Sub OpenWorkbook()
Dim wb As Workbook
Set wb = Workbooks.Open("C:\Data\Sales.xlsx")
MsgBox "Opened: " & wb.Name
End Sub
Pro Tip: Use the ReadOnly:=True parameter if you only need to read data — this prevents file-locking issues for other users.
Workbooks
The Close method's SaveChanges parameter controls whether to save before closing. False discards all unsaved changes.
Sub CloseWorkbook()
Dim wb As Workbook
Set wb = Workbooks("Sales.xlsx")
' Save and close
wb.Close SaveChanges:=True
' Close without saving
' wb.Close SaveChanges:=False
End Sub
Pro Tip: Set wb = Nothing after closing to release the object reference and free memory.
Workbooks
Save overwrites the current file. SaveAs creates a new file — useful for versioning. FileFormat ensures the correct file type.
Sub SaveWorkbook()
' Save current workbook
ThisWorkbook.Save
' Save As with new name
ThisWorkbook.SaveAs Filename:="C:\Reports\MonthlyReport_" & Format(Date, "yyyy-mm") & ".xlsx", _
FileFormat:=xlOpenXMLWorkbook
End Sub
Pro Tip: Use Format(Date, "yyyy-mm-dd") in the filename for automatic date-stamped backups.
Workbooks
Workbooks.Add creates a new blank workbook with the default number of sheets. You can immediately write to it and save it.
Sub CreateNewWorkbook()
Dim wb As Workbook
Set wb = Workbooks.Add
wb.Sheets(1).Range("A1").Value = "New Report"
wb.SaveAs Filename:="C:\Reports\NewFile.xlsx", FileFormat:=xlOpenXMLWorkbook
MsgBox "Created: " & wb.FullName
End Sub
Pro Tip: Workbooks.Add(template) can create a workbook from a template file — pass the full path to an .xltx file.
Data Operations
The Sort object allows multi-level sorting. SortFields.Add2 defines each sort key with its order. .Header = xlYes excludes the header row from sorting.
Sub SortData()
Dim ws As Worksheet
Set ws = ThisWorkbook.Sheets("Data")
Dim lastRow As Long
lastRow = ws.Cells(ws.Rows.Count, 1).End(xlUp).Row
With ws.Sort
.SortFields.Clear
.SortFields.Add2 Key:=ws.Range("B2:B" & lastRow), Order:=xlAscending
.SortFields.Add2 Key:=ws.Range("C2:C" & lastRow), Order:=xlDescending
.SetRange ws.Range("A1:D" & lastRow)
.Header = xlYes
.Apply
End With
End Sub
Pro Tip: Always call .SortFields.Clear before adding keys — otherwise previous sort fields accumulate and cause unexpected results.
Data Operations
AutoFilter applies dropdown filters programmatically. Field is the column number (1-based from the range start). Multiple AutoFilter calls on the same range add criteria.
Sub FilterData()
Dim ws As Worksheet
Set ws = ThisWorkbook.Sheets("Data")
' Remove existing filter
If ws.AutoFilterMode Then ws.AutoFilterMode = False
' Apply filter: column 2 = "East", column 3 > 1000
ws.Range("A1").CurrentRegion.AutoFilter Field:=2, Criteria1:="East"
ws.Range("A1").CurrentRegion.AutoFilter Field:=3, Criteria1:=">1000"
End Sub
Sub ClearFilter()
If ActiveSheet.AutoFilterMode Then ActiveSheet.AutoFilterMode = False
End Sub
Pro Tip: Use CurrentRegion to auto-detect the data boundaries around A1 instead of hardcoding the range.
Data Operations
RemoveDuplicates deletes rows where the specified columns have identical values, keeping only the first occurrence.
Sub RemoveDupes()
Dim ws As Worksheet
Set ws = ThisWorkbook.Sheets("Data")
Dim lastRow As Long
lastRow = ws.Cells(ws.Rows.Count, 1).End(xlUp).Row
' Remove duplicates based on columns 1 and 2 (A and B)
ws.Range("A1:D" & lastRow).RemoveDuplicates Columns:=Array(1, 2), Header:=xlYes
MsgBox "Duplicates removed. Rows remaining: " & ws.Cells(ws.Rows.Count, 1).End(xlUp).Row
End Sub
Pro Tip: The Columns parameter is relative to the range, not the sheet. Column 1 means the first column of the range you specify.
Data Operations
The Replace method works like Ctrl+H but from VBA. LookAt:=xlPart matches partial cell content; xlWhole requires an exact match.
Sub FindAndReplace()
Dim ws As Worksheet
Set ws = ThisWorkbook.Sheets("Data")
ws.Cells.Replace What:="old text", Replacement:="new text", _
LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False
End Sub
Pro Tip: Use LookAt:=xlWhole when replacing codes or IDs to avoid partial matches (e.g., replacing 'cat' inside 'category').
Data Operations
AdvancedFilter supports complex criteria (AND/OR across rows), can copy results to a new location, and can extract unique records.
Sub AdvancedFilterExample()
Dim ws As Worksheet
Set ws = ThisWorkbook.Sheets("Data")
Dim lastRow As Long
lastRow = ws.Cells(ws.Rows.Count, 1).End(xlUp).Row
' Criteria range should be set up on the sheet (e.g., F1:G2)
' F1 = "Region", F2 = "East"
' G1 = "Amount", G2 = ">5000"
ws.Range("A1:D" & lastRow).AdvancedFilter _
Action:=xlFilterCopy, _
CriteriaRange:=ws.Range("F1:G2"), _
CopyToRange:=ws.Range("I1"), _
Unique:=False
End Sub
Pro Tip: Set up your criteria range with headers that exactly match your data headers. Same-row criteria are AND; different-row criteria are OR.
Common Snippets
This creates an Outlook email using late binding (no reference needed). .Display shows a preview; replace with .Send to send automatically.
Sub SendEmail()
Dim olApp As Object
Dim olMail As Object
Set olApp = CreateObject("Outlook.Application")
Set olMail = olApp.CreateItem(0)
With olMail
.To = "[email protected]"
.CC = ""
.Subject = "Monthly Report - " & Format(Date, "mmmm yyyy")
.Body = "Hi," & vbCrLf & vbCrLf & "Please find the attached report." & vbCrLf & "Best regards"
.Attachments.Add ThisWorkbook.FullName
.Display ' Use .Send to send without preview
End With
Set olMail = Nothing
Set olApp = Nothing
End Sub
Pro Tip: Use late binding (CreateObject) so the code works even if the Outlook version differs between machines — no broken references.
Common Snippets
Protect locks cells (those with the Locked property) to prevent editing. AllowFiltering and AllowSorting let users interact without full access.
Sub ProtectSheet()
Dim ws As Worksheet
Set ws = ThisWorkbook.Sheets("Report")
' Protect with password, allow filtering and sorting
ws.Protect Password:="mypass123", AllowFiltering:=True, AllowSorting:=True
End Sub
Sub UnprotectSheet()
ThisWorkbook.Sheets("Report").Unprotect Password:="mypass123"
End Sub
Pro Tip: Before protecting, unlock cells you want users to edit: select them → Ctrl+1 → Protection tab → uncheck 'Locked'.
Common Snippets
Loops backward (bottom to top) to avoid skipping rows when deleting. CountA counts non-empty cells in the row — if zero, the row is blank.
Sub DeleteBlankRows()
Dim ws As Worksheet
Set ws = ActiveSheet
Dim lastRow As Long
lastRow = ws.Cells(ws.Rows.Count, 1).End(xlUp).Row
Dim i As Long
For i = lastRow To 1 Step -1
If Application.WorksheetFunction.CountA(ws.Rows(i)) = 0 Then
ws.Rows(i).Delete
End If
Next i
End Sub
Pro Tip: Always loop backward (Step -1) when deleting rows. Forward loops skip the row that shifts up into the deleted position.
Common Snippets
CountIf counts occurrences of each value. If a value appears more than once, the cell is highlighted with a light red background.
Sub HighlightDuplicates()
Dim ws As Worksheet
Set ws = ActiveSheet
Dim lastRow As Long
lastRow = ws.Cells(ws.Rows.Count, 1).End(xlUp).Row
Dim rng As Range
Set rng = ws.Range("A1:A" & lastRow)
Dim cell As Range
For Each cell In rng
If Application.WorksheetFunction.CountIf(rng, cell.Value) > 1 Then
cell.Interior.Color = RGB(255, 200, 200) ' Light red
End If
Next cell
End Sub
Pro Tip: For large datasets, consider using a Dictionary object for O(n) performance instead of CountIf's O(n^2).
Common Snippets
Creates a TOC sheet with clickable hyperlinks to every other sheet in the workbook. Clears and rebuilds if the TOC already exists.
Sub CreateTOC()
Dim tocSheet As Worksheet
Dim ws As Worksheet
Dim i As Long
' Create or clear TOC sheet
On Error Resume Next
Set tocSheet = ThisWorkbook.Sheets("TOC")
On Error GoTo 0
If tocSheet Is Nothing Then
Set tocSheet = ThisWorkbook.Worksheets.Add(Before:=ThisWorkbook.Sheets(1))
tocSheet.Name = "TOC"
Else
tocSheet.Cells.Clear
End If
tocSheet.Range("A1").Value = "Table of Contents"
tocSheet.Range("A1").Font.Bold = True
tocSheet.Range("A1").Font.Size = 14
i = 3
For Each ws In ThisWorkbook.Worksheets
If ws.Name <> "TOC" Then
tocSheet.Hyperlinks.Add _
Anchor:=tocSheet.Cells(i, 1), _
Address:="", _
SubAddress:="'" & ws.Name & "'!A1", _
TextToDisplay:=ws.Name
i = i + 1
End If
Next ws
tocSheet.Columns("A").AutoFit
End Sub
Pro Tip: Run this macro whenever you add or rename sheets to keep the TOC current. Consider adding it to a Workbook_Open event for automatic updates.
Common Snippets
Loops through every worksheet and sets Visible to xlSheetVisible, unhiding both Hidden and VeryHidden sheets.
Sub UnhideAllSheets()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Visible = xlSheetVisible
Next ws
MsgBox "All sheets are now visible."
End Sub
Pro Tip: This is one of the most useful quick macros — it reveals VeryHidden sheets that cannot be unhidden through the Excel UI.
Common Snippets
Copies the active sheet to a temporary workbook, saves it as CSV, then closes the temp workbook. The original file is untouched.
Sub ExportToCSV()
Dim ws As Worksheet
Set ws = ActiveSheet
Dim savePath As String
savePath = ThisWorkbook.Path & "\" & ws.Name & "_" & Format(Date, "yyyymmdd") & ".csv"
' Copy sheet to a temp workbook to avoid changing the original
ws.Copy
ActiveWorkbook.SaveAs Filename:=savePath, FileFormat:=xlCSV, CreateBackup:=False
ActiveWorkbook.Close SaveChanges:=False
MsgBox "Exported to: " & savePath
End Sub
Pro Tip: The copy-then-save approach prevents Excel from nagging about CSV limitations or changing your original workbook format.
Common Snippets
Loops through every worksheet and auto-fits all column widths and row heights to match their content.
Sub AutoFitAll()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Cells.EntireColumn.AutoFit
ws.Cells.EntireRow.AutoFit
Next ws
MsgBox "All columns and rows auto-fitted."
End Sub
Pro Tip: For very large sheets, auto-fitting can be slow. Target only the used range instead: ws.UsedRange.Columns.AutoFit.
Common Snippets
Disabling ScreenUpdating, Calculation, and Events dramatically speeds up macros by preventing Excel from redrawing, recalculating, and firing events after every change.
Sub FastMacro()
' Turn off screen updating and calculation for speed
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Application.EnableEvents = False
' --- Your macro code here ---
Dim i As Long
For i = 1 To 10000
Cells(i, 1).Value = i
Next i
' --- End of macro code ---
' Restore settings
Application.EnableEvents = True
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub
Pro Tip: Always restore these settings in an error handler or at the end. If a macro crashes with ScreenUpdating off, the sheet appears frozen until you reset it manually.
Common Snippets
InputBox prompts for a password. If it does not match, Exit Sub halts execution. This provides basic access control for sensitive macros.
Sub SecureMacro()
Dim pw As String
pw = InputBox("Enter password to continue:", "Authentication")
If pw <> "admin123" Then
MsgBox "Incorrect password. Macro cancelled.", vbExclamation
Exit Sub
End If
' Protected code runs here
MsgBox "Access granted! Running protected operation..."
End Sub
Pro Tip: This is not strong security — VBA passwords can be bypassed. For truly sensitive operations, use Windows authentication or external services.
Formatting
The Font object on any Range exposes Bold, Italic, and Underline properties. Use a With block to set multiple font properties efficiently on the same range.
Sub FormatBoldItalicUnderline()
' Bold
Range("A1").Font.Bold = True
' Italic
Range("A2").Font.Italic = True
' Underline
Range("A3").Font.Underline = xlUnderlineStyleSingle
' Combine all three on a range
With Range("B1:B5").Font
.Bold = True
.Italic = True
.Underline = xlUnderlineStyleSingle
End With
End Sub
Pro Tip: xlUnderlineStyleDouble gives a double underline, which is commonly used for totals in financial reports.
Formatting
Interior.Color sets the cell background; Font.Color sets the text color. You can use RGB values, ColorIndex numbers, or ThemeColor constants.
Sub SetCellColors()
' Background color using RGB
Range("A1").Interior.Color = RGB(255, 255, 0) ' Yellow
' Font color using RGB
Range("A1").Font.Color = RGB(0, 0, 128) ' Navy blue
' Use built-in color index
Range("A2").Interior.ColorIndex = 6 ' Yellow
Range("A2").Font.ColorIndex = 3 ' Red
' Theme color
Range("A3").Interior.ThemeColor = xlThemeColorAccent1
End Sub
Pro Tip: Prefer RGB() over ColorIndex for precise colors. ColorIndex only supports 56 colors, while RGB gives you 16 million+.
Formatting
The Borders collection lets you control each edge individually. BorderAround is a shortcut for outer edges. xlInsideVertical and xlInsideHorizontal handle the grid lines inside the range.
Sub ApplyBorders()
Dim rng As Range
Set rng = Range("A1:D10")
' All inside and outside borders
With rng.Borders
' Outside edges
rng.BorderAround Weight:=xlMedium, LineStyle:=xlContinuous
End With
' Inside vertical borders
With rng.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.Weight = xlThin
.Color = RGB(0, 0, 0)
End With
' Inside horizontal borders
With rng.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.Weight = xlThin
.Color = RGB(0, 0, 0)
End With
End Sub
Pro Tip: Use xlEdgeTop, xlEdgeBottom, xlEdgeLeft, and xlEdgeRight to style individual sides differently, such as a thick bottom border for header rows.
Formatting
The NumberFormat property accepts the same format strings you see in Format Cells > Custom. This lets you control how numbers, dates, and text are displayed without changing the underlying value.
Sub CustomNumberFormats()
' Currency with thousands separator
Range("A1:A10").NumberFormat = "$#,##0.00"
' Percentage with one decimal
Range("B1:B10").NumberFormat = "0.0%"
' Date format
Range("C1:C10").NumberFormat = "yyyy-mm-dd"
' Custom: negative numbers in red with parentheses
Range("D1:D10").NumberFormat = "#,##0.00;[Red](#,##0.00);0.00"
' Text format (prevents number conversion)
Range("E1:E10").NumberFormat = "@"
End Sub
Pro Tip: Use the format string '@' to force text storage — ideal for ZIP codes, leading-zero IDs, and phone numbers that Excel would otherwise convert to numbers.
Formatting
Columns.AutoFit adjusts each column width to fit its widest cell content. Targeting UsedRange instead of all Cells is much faster on large sheets.
Sub AutoFitColumns()
Dim ws As Worksheet
Set ws = ActiveSheet
' AutoFit only used columns for performance
ws.UsedRange.Columns.AutoFit
' Optionally set a minimum width
Dim col As Range
For Each col In ws.UsedRange.Columns
If col.ColumnWidth < 8 Then col.ColumnWidth = 8
Next col
End Sub
Pro Tip: After AutoFit, add a small buffer (col.ColumnWidth = col.ColumnWidth + 2) to prevent text from touching cell borders.
User Interaction
VBA's InputBox returns a string. Application.InputBox adds a Type parameter: 1 for numbers, 2 for text, 8 for a range selection. Type:=8 lets users click cells directly.
Sub GetUserInput()
' Text input
Dim userName As String
userName = InputBox("Enter your name:", "User Name")
If userName = "" Then Exit Sub
' Number input (Type:=1 forces numeric)
Dim qty As Double
qty = Application.InputBox("Enter quantity:", "Quantity", Type:=1)
' Range input (Type:=8 lets user select cells)
Dim rng As Range
On Error Resume Next
Set rng = Application.InputBox("Select a range:", "Range Selector", Type:=8)
On Error GoTo 0
If Not rng Is Nothing Then
MsgBox userName & " entered qty " & qty & " for range " & rng.Address
End If
End Sub
Pro Tip: Always wrap Type:=8 (range selection) in On Error Resume Next — if the user clicks Cancel, it returns False and would cause a type mismatch error.
User Interaction
MsgBox returns a VbMsgBoxResult indicating which button was clicked. Combine button constants (vbYesNoCancel) with icon constants (vbQuestion) and default button settings using +.
Sub ConfirmAction()
Dim answer As VbMsgBoxResult
answer = MsgBox("Are you sure you want to delete all data?", _
vbYesNoCancel + vbQuestion + vbDefaultButton2, _
"Confirm Deletion")
Select Case answer
Case vbYes
MsgBox "Deleting data...", vbInformation
' Add deletion code here
Case vbNo
MsgBox "Operation skipped.", vbInformation
Case vbCancel
MsgBox "Operation cancelled.", vbInformation
End Select
End Sub
Pro Tip: Use vbDefaultButton2 to default to 'No' on destructive actions — this prevents accidental confirmations when users press Enter too quickly.
User Interaction
UserForms provide custom dialog boxes with text fields, buttons, dropdowns, and more. The form code handles control events like button clicks. Show displays the form modally.
' === Step 1: Insert a UserForm ===
' In VBE: Insert menu → UserForm
' Add controls: TextBox (txtName), TextBox (txtEmail),
' CommandButton (btnSubmit), CommandButton (btnCancel)
' === Step 2: UserForm code (in the UserForm module) ===
' Private Sub btnSubmit_Click()
' Dim nextRow As Long
' nextRow = Sheet1.Cells(Sheet1.Rows.Count, 1).End(xlUp).Row + 1
' Sheet1.Cells(nextRow, 1).Value = txtName.Text
' Sheet1.Cells(nextRow, 2).Value = txtEmail.Text
' MsgBox "Record added!", vbInformation
' txtName.Text = ""
' txtEmail.Text = ""
' txtName.SetFocus
' End Sub
'
' Private Sub btnCancel_Click()
' Unload Me
' End Sub
' === Step 3: Show the form from a standard module ===
Sub ShowDataEntryForm()
Dim frm As New UserForm1
frm.Show
End Sub
Pro Tip: Use frm.Show vbModeless to allow users to interact with the worksheet while the form is open — useful for lookup tools.
User Interaction
FileDialog provides a native Windows file picker. msoFileDialogFilePicker selects files; msoFileDialogFolderPicker selects folders. .Show returns -1 if the user clicks OK.
Sub PickFile()
Dim fd As FileDialog
Set fd = Application.FileDialog(msoFileDialogFilePicker)
With fd
.Title = "Select a File"
.AllowMultiSelect = False
.Filters.Clear
.Filters.Add "Excel Files", "*.xls; *.xlsx; *.xlsm"
.Filters.Add "CSV Files", "*.csv"
.Filters.Add "All Files", "*.*"
.InitialFileName = "C:\"
If .Show = -1 Then
Dim filePath As String
filePath = .SelectedItems(1)
MsgBox "You selected: " & filePath
Else
MsgBox "No file selected.", vbInformation
End If
End With
End Sub
Pro Tip: Use msoFileDialogFolderPicker when you need a folder path, and set AllowMultiSelect = True to let users pick multiple files at once.
User Interaction
Application.StatusBar displays custom text in the bottom-left status bar of Excel. Set it to False to restore the default. DoEvents lets Excel refresh the UI during long operations.
Sub ShowProgress()
Dim totalRows As Long
totalRows = 10000
Dim i As Long
For i = 1 To totalRows
' Simulated work
Cells(i, 1).Value = i
' Update status bar every 500 rows
If i Mod 500 = 0 Then
Application.StatusBar = "Processing row " & i & " of " & totalRows & _
" (" & Format(i / totalRows, "0%") & ")..."
DoEvents ' Allow Excel to refresh
End If
Next i
Application.StatusBar = False ' Restore default status bar
MsgBox "Done! Processed " & totalRows & " rows."
End Sub
Pro Tip: Update the StatusBar only every N iterations (using Mod) — updating every single row slows the macro down significantly.
File Operations
QueryTables.Add with a TEXT connection imports CSV data with full control over delimiters, text qualifiers, and column data types. Deleting the QueryTable afterward keeps the data without a live link.
Sub ImportCSV()
Dim ws As Worksheet
Set ws = ThisWorkbook.Sheets("Data")
Dim csvPath As String
csvPath = "C:\Data\import.csv"
' Method 1: QueryTable (handles delimiters well)
With ws.QueryTables.Add(Connection:="TEXT;" & csvPath, Destination:=ws.Range("A1"))
.TextFileCommaDelimiter = True
.TextFileParseType = xlDelimited
.TextFileConsecutiveDelimiter = False
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.Refresh BackgroundQuery:=False
.Delete ' Remove the QueryTable link, keep data
End With
MsgBox "CSV imported successfully!"
End Sub
Pro Tip: For quick imports, you can also use Workbooks.Open on the CSV file and then copy the data to your target sheet — simpler but less control over parsing.
File Operations
Dir() returns the first file matching a pattern. Subsequent calls to Dir() without arguments return the next matching file. An empty string signals no more files.
Sub ListFilesInFolder()
Dim folderPath As String
folderPath = "C:\Reports\"
Dim fileName As String
fileName = Dir(folderPath & "*.xls*") ' Filter for Excel files
Dim ws As Worksheet
Set ws = ActiveSheet
Dim row As Long
row = 1
ws.Range("A1:C1").Value = Array("File Name", "Full Path", "Size (KB)")
row = 2
Do While fileName <> ""
ws.Cells(row, 1).Value = fileName
ws.Cells(row, 2).Value = folderPath & fileName
ws.Cells(row, 3).Value = Round(FileLen(folderPath & fileName) / 1024, 1)
fileName = Dir() ' Get next file
row = row + 1
Loop
MsgBox "Found " & (row - 2) & " files."
End Sub
Pro Tip: Dir does not recurse into subfolders. For recursive file listing, use FileSystemObject with a recursive Sub or the command shell DIR /S.
File Operations
Dir() returns an empty string if the file does not exist. Wrapping this in a reusable function keeps your code clean and prevents runtime errors from opening missing files.
Function FileExists(filePath As String) As Boolean
FileExists = (Dir(filePath) <> "")
End Function
Sub SafeOpenFile()
Dim fPath As String
fPath = "C:\Data\Sales.xlsx"
If FileExists(fPath) Then
Dim wb As Workbook
Set wb = Workbooks.Open(fPath)
MsgBox "Opened: " & wb.Name
Else
MsgBox "File not found:" & vbCrLf & fPath, vbExclamation, "Error"
End If
End Sub
Pro Tip: For checking folders, use Dir(folderPath, vbDirectory) <> "" — the vbDirectory attribute is needed to match directory entries.
File Operations
ExportAsFixedFormat converts a range, sheet, or workbook to PDF. Set IgnorePrintAreas to False to respect any print areas you have defined on the sheet.
Sub ExportRangeAsPDF()
Dim ws As Worksheet
Set ws = ActiveSheet
Dim savePath As String
savePath = ThisWorkbook.Path & "\" & ws.Name & "_" & Format(Date, "yyyymmdd") & ".pdf"
' Export the used range (or specify a custom range)
ws.UsedRange.ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:=savePath, _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=True
MsgBox "PDF saved to: " & savePath
End Sub
Pro Tip: Set the page orientation and margins via ws.PageSetup before exporting to control the PDF layout — especially important for wide tables.
Error Handling
On Error GoTo routes execution to a labeled error handler — ideal for structured cleanup. On Error Resume Next skips errors silently — use it for quick checks but always restore with On Error GoTo 0.
Sub ErrorHandlingPatterns()
' Pattern 1: On Error GoTo (structured handler)
On Error GoTo ErrHandler
Dim wb As Workbook
Set wb = Workbooks.Open("C:\NonExistent\File.xlsx")
MsgBox "File opened: " & wb.Name
CleanUp:
On Error Resume Next
' Clean up resources here
Set wb = Nothing
Exit Sub
ErrHandler:
MsgBox "Error " & Err.Number & ": " & Err.Description, vbCritical, "Error"
Resume CleanUp
End Sub
Sub ResumeNextExample()
' Pattern 2: On Error Resume Next (inline check)
On Error Resume Next
Dim ws As Worksheet
Set ws = ThisWorkbook.Sheets("MayNotExist")
On Error GoTo 0 ' Restore normal error handling
If ws Is Nothing Then
MsgBox "Sheet not found. Creating it..."
Set ws = ThisWorkbook.Worksheets.Add
ws.Name = "MayNotExist"
End If
End Sub
Pro Tip: Never leave On Error Resume Next active for long stretches of code. Always follow it with On Error GoTo 0 as soon as the risky operation is complete.
Error Handling
A reusable LogError Sub writes error details (timestamp, source, error number, description) to a dedicated ErrorLog worksheet. Any macro can call it from its error handler.
Sub LogError(source As String, errNum As Long, errDesc As String)
Dim wsLog As Worksheet
On Error Resume Next
Set wsLog = ThisWorkbook.Sheets("ErrorLog")
On Error GoTo 0
' Create log sheet if it does not exist
If wsLog Is Nothing Then
Set wsLog = ThisWorkbook.Worksheets.Add(After:=ThisWorkbook.Sheets(ThisWorkbook.Sheets.Count))
wsLog.Name = "ErrorLog"
wsLog.Range("A1:D1").Value = Array("Timestamp", "Source", "Error #", "Description")
wsLog.Range("A1:D1").Font.Bold = True
End If
Dim nextRow As Long
nextRow = wsLog.Cells(wsLog.Rows.Count, 1).End(xlUp).Row + 1
wsLog.Cells(nextRow, 1).Value = Now
wsLog.Cells(nextRow, 2).Value = source
wsLog.Cells(nextRow, 3).Value = errNum
wsLog.Cells(nextRow, 4).Value = errDesc
wsLog.Columns("A:D").AutoFit
End Sub
Sub MacroWithLogging()
On Error GoTo ErrHandler
' Intentional error for demo
Dim x As Long
x = 1 / 0
Exit Sub
ErrHandler:
LogError "MacroWithLogging", Err.Number, Err.Description
MsgBox "An error occurred and was logged.", vbExclamation
End Sub
Pro Tip: Add the user's name with Application.UserName and the workbook name with ThisWorkbook.Name for even richer diagnostics in shared environments.