Excel Formulas with Examples
44 most useful Excel formulas — SUM, IF, VLOOKUP, XLOOKUP, COUNTIF, SUMIFS, DATEDIF, PMT and more — with syntax, a real example and when to use each.
How to use Excel Formulas with Examples
- Pick a group — Maths, Count, Logic, Lookup, Text, Date or Finance — or search a function.
- Read the syntax and the worked example.
- Click Copy to paste the example formula into Excel or Google Sheets and change the ranges.
Frequently asked questions
Do these formulas work in Google Sheets?
Almost all of them do. XLOOKUP, FILTER, UNIQUE and SORT work in Google Sheets too; DATEDIF works in both.
What is the difference between VLOOKUP and XLOOKUP?
VLOOKUP only looks to the right and needs a column number. XLOOKUP looks in any direction, has a built-in “not found” value and does not break when columns are inserted — but needs Excel 2021 or Microsoft 365.
Why does my formula show #N/A?
A lookup did not find the value — check for extra spaces (use TRIM) and use FALSE / 0 for an exact match. Wrap it in IFERROR to show a friendly message.