Spreadsheet how-to recipes
282 common spreadsheet tasks with copy-paste formulas for Microsoft Excel, Google Sheets, and LibreOffice Calc — each recipe formula executed and verified in LibreOffice Calc. 282 of them have also been executed in Google Sheets (2026-08-30), and those pages show what each engine actually returned side by side. Excel is documentation only.
What the two engines did with the same 282 recipes: 282 had their worked example — and every extra formula on the page — executed in Google Sheets (2026-08-30, Drive import) as well as LibreOffice. 265 came back with exactly the values LibreOffice produced. 17 disagreed on at least one formula, and those are the interesting ones: a function Google Sheets lacks, an argument that means something else there, or an array expression it declines to expand inside a scalar function. Each of those pages prints both engines’ values side by side and flags the disagreement rather than picking a winner. Every recipe in the corpus has now been executed in both engines, including the ones whose worked examples need extra worksheets — those are built one workbook per check, so their tab names and tab order survive the Drive round-trip without anything being renamed or rewritten.
Dates & times (85) · Text & names (53) · Lookups & filters (46) · Counting & conditions (34) · Formatting & display (6) · Math, money & stats (58)
Dates & times
- How to add business days to a date LibreOffice-verified Sheets-executed
- How to add days to a date LibreOffice-verified Sheets-executed
- How to add hours (or minutes) to a time LibreOffice-verified Sheets-executed
- How to add months to a date LibreOffice-verified Sheets-executed
- How to convert an annual growth rate to monthly LibreOffice-verified Sheets-executed
- How to average a range of times LibreOffice-verified Sheets-executed
- How to average values between two dates LibreOffice-verified Sheets-executed
- How to average while excluding outliers (TRIMMEAN) LibreOffice-verified Sheets-executed
- How to average a range that contains errors LibreOffice-verified Sheets-executed
- How to average a range while ignoring zeros (and blanks) LibreOffice-verified Sheets-executed
- How to average the top N scores (drop the lowest) LibreOffice-verified Sheets-executed
- How to average the last N values in a growing column LibreOffice-verified Sheets-executed
- How to average with multiple criteria (AVERAGEIFS) LibreOffice-verified Sheets-executed
- How to count business days left in the month LibreOffice-verified Sheets-executed
- How to calculate a moving average LibreOffice-verified Sheets-executed
- How to calculate age in years from a birth date LibreOffice-verified Sheets-executed
- How to calculate age in years and months LibreOffice-verified Sheets-executed
- How to calculate the discount percentage from two prices LibreOffice-verified Sheets-executed
- How to calculate elapsed years as a decimal (YEARFRAC) LibreOffice-verified Sheets-executed
- How to calculate hours worked minus a break LibreOffice-verified Sheets-executed
- How to calculate overtime pay LibreOffice-verified Sheets-executed
- How to calculate a percentage of a number LibreOffice-verified Sheets-executed
- How to cap a percentage at 100% LibreOffice-verified Sheets-executed
- How to check if a year is a leap year LibreOffice-verified Sheets-executed
- How to concatenate a date with text (without getting a number) LibreOffice-verified Sheets-executed
- How to convert 12-hour text times to 24-hour LibreOffice-verified Sheets-executed
- How to convert a date to text LibreOffice-verified Sheets-executed
- How to convert times between time zones LibreOffice-verified Sheets-executed
- How to convert an hourly rate to an annual salary LibreOffice-verified Sheets-executed
- How to convert minutes to hours and minutes LibreOffice-verified Sheets-executed
- How to convert seconds to hours:minutes:seconds LibreOffice-verified Sheets-executed
- How to convert text to a real date LibreOffice-verified Sheets-executed
- How to convert a time to a decimal number LibreOffice-verified Sheets-executed
- How to count business days between two dates LibreOffice-verified Sheets-executed
- How to count cells above the average LibreOffice-verified Sheets-executed
- How to count dates within a range LibreOffice-verified Sheets-executed
- How to count the working days in a month LibreOffice-verified Sheets-executed
- How to create a list of dates LibreOffice-verified Sheets-executed
- How to calculate a cumulative (running) percentage LibreOffice-verified Sheets-executed
- How to get the day number of the year (1-365) LibreOffice-verified Sheets-executed
- How to calculate the number of days between two dates LibreOffice-verified Sheets-executed
- How to get the number of days in a month LibreOffice-verified Sheets-executed
- How to count days since a date LibreOffice-verified Sheets-executed
- How to count days until a date LibreOffice-verified Sheets-executed
- How to find the earliest (or latest) date per category LibreOffice-verified Sheets-executed
- How to find the latest (or earliest) date in a range LibreOffice-verified Sheets-executed
- How to get the first and last day of the month LibreOffice-verified Sheets-executed
- How to get the first day of next month LibreOffice-verified Sheets-executed
- How to get the first day of the week for any date LibreOffice-verified Sheets-executed
- How to flag overdue dates LibreOffice-verified Sheets-executed
- How to get the month name from a date LibreOffice-verified Sheets-executed
- How to get the quarter from a date LibreOffice-verified Sheets-executed
- How to get the week number of a date LibreOffice-verified Sheets-executed
- How to get the weekday name from a date LibreOffice-verified Sheets-executed
- How to get the year, month, or day from a date LibreOffice-verified Sheets-executed
- How to calculate hours between two date-times LibreOffice-verified Sheets-executed
- How to calculate hours between two times LibreOffice-verified Sheets-executed
- How to use AVERAGEIF (and AVERAGEIFS) LibreOffice-verified Sheets-executed
- How to identify weekends with a formula LibreOffice-verified Sheets-executed
- How to increase a number by a percentage LibreOffice-verified Sheets-executed
- How to get the last day of the previous month LibreOffice-verified Sheets-executed
- How to calculate the monthly savings needed for a goal LibreOffice-verified Sheets-executed
- How to calculate the number of months between two dates LibreOffice-verified Sheets-executed
- How to calculate the next birthday (or anniversary) date LibreOffice-verified Sheets-executed
- How to find the next occurrence of a weekday (next Friday) LibreOffice-verified Sheets-executed
- How to calculate percentage change between two numbers LibreOffice-verified Sheets-executed
- How to calculate the percentage difference between two numbers LibreOffice-verified Sheets-executed
- How to calculate each row as a percentage of the total LibreOffice-verified Sheets-executed
- Percentage points vs percent change: compute both LibreOffice-verified Sheets-executed
- How to prorate a monthly amount by days LibreOffice-verified Sheets-executed
- How to create a quarter-and-year label like "Q3 2026" LibreOffice-verified Sheets-executed
- How to get the quarter-end date for any date LibreOffice-verified Sheets-executed
- How to remove the time from a date-time LibreOffice-verified Sheets-executed
- How to reverse a percentage: X is P% of what? LibreOffice-verified Sheets-executed
- How to round time to the nearest 15 minutes LibreOffice-verified Sheets-executed
- How to calculate seconds between two times LibreOffice-verified Sheets-executed
- How to sum values between two dates LibreOffice-verified Sheets-executed
- How to sum values by day of the week LibreOffice-verified Sheets-executed
- How to sum values from the last 7 days LibreOffice-verified Sheets-executed
- How to sum times past 24 hours (without them wrapping) LibreOffice-verified Sheets-executed
- How to sum values by month LibreOffice-verified Sheets-executed
- How to calculate a time difference that crosses midnight LibreOffice-verified Sheets-executed
- How to count weeks and days between two dates LibreOffice-verified Sheets-executed
- How to calculate a weighted average LibreOffice-verified Sheets-executed
- How to calculate a year-to-date (YTD) total LibreOffice-verified Sheets-executed
Text & names
- How to add a prefix or suffix to a cell LibreOffice-verified Sheets-executed
- How to add leading zeros to a number LibreOffice-verified Sheets-executed
- How to capitalize only the first letter (sentence case) LibreOffice-verified Sheets-executed
- How to do a case-sensitive lookup LibreOffice-verified Sheets-executed
- How to check if a cell contains any word from a list LibreOffice-verified Sheets-executed
- How to combine first and last names into one cell LibreOffice-verified Sheets-executed
- How to concatenate cells that meet a condition (TEXTJOIN IF) LibreOffice-verified Sheets-executed
- How to combine cells with a line break between them LibreOffice-verified Sheets-executed
- How to convert a column letter to a number LibreOffice-verified Sheets-executed
- How to convert a column number to a letter LibreOffice-verified Sheets-executed
- How to convert currency text like "$1,234.50" to a number LibreOffice-verified Sheets-executed
- How to convert text that looks like a number into a real number LibreOffice-verified Sheets-executed
- How to count cells that contain specific text LibreOffice-verified Sheets-executed
- How to count characters in a cell LibreOffice-verified Sheets-executed
- How to count the total words in a range LibreOffice-verified Sheets-executed
- How to count the number of words in a cell LibreOffice-verified Sheets-executed
- How to extract the domain from an email address LibreOffice-verified Sheets-executed
- How to extract the first name from a full name LibreOffice-verified Sheets-executed
- How to extract the last name from a full name LibreOffice-verified Sheets-executed
- How to extract numbers from text in a cell LibreOffice-verified Sheets-executed
- How to extract the first word (text before the first space) LibreOffice-verified Sheets-executed
- How to extract text between two characters LibreOffice-verified Sheets-executed
- How to extract the file name from a path or URL LibreOffice-verified Sheets-executed
- How to extract the last word from a cell LibreOffice-verified Sheets-executed
- How to extract the username from an email address LibreOffice-verified Sheets-executed
- How to find the most common text value (mode for text) LibreOffice-verified Sheets-executed
- How to find the Nth occurrence of a character LibreOffice-verified Sheets-executed
- How to find the position of a character in text LibreOffice-verified Sheets-executed
- How to flip "Last, First" into "First Last" LibreOffice-verified Sheets-executed
- How to generate email addresses from names LibreOffice-verified Sheets-executed
- How to get initials from a name LibreOffice-verified Sheets-executed
- How to extract the nth word from a cell LibreOffice-verified Sheets-executed
- How to change text to uppercase, lowercase, or Title Case LibreOffice-verified Sheets-executed
- How to combine two or more cells into one LibreOffice-verified Sheets-executed
- How to use LEFT, MID, and RIGHT LibreOffice-verified Sheets-executed
- How to use TEXTJOIN LibreOffice-verified Sheets-executed
- How to use the TEXT function LibreOffice-verified Sheets-executed
- How to check if a cell contains specific text LibreOffice-verified Sheets-executed
- How to convert a score to a letter grade LibreOffice-verified Sheets-executed
- How to capitalize the first letter of each word (proper case) LibreOffice-verified Sheets-executed
- How to remove extra spaces from text LibreOffice-verified Sheets-executed
- How to remove line breaks from a cell LibreOffice-verified Sheets-executed
- How to remove specific text from a cell LibreOffice-verified Sheets-executed
- How to remove everything after a character LibreOffice-verified Sheets-executed
- How to remove text before a character LibreOffice-verified Sheets-executed
- How to remove the first N characters from a cell LibreOffice-verified Sheets-executed
- How to reverse a text string LibreOffice-verified Sheets-executed
- How to split a bill with tip LibreOffice-verified Sheets-executed
- How to split text into rows LibreOffice-verified Sheets-executed
- How to split text into separate columns with a formula LibreOffice-verified Sheets-executed
- How to get the text after the last delimiter (e.g. a file extension) LibreOffice-verified Sheets-executed
- How to truncate text with an ellipsis LibreOffice-verified Sheets-executed
- How to use a cell value as a sheet name (INDIRECT) LibreOffice-verified Sheets-executed
Lookups & filters
- How to lock a cell reference (absolute vs relative, the $ sign) LibreOffice-verified Sheets-executed
- How to check if a value exists in a list LibreOffice-verified Sheets-executed
- How to combine multiple columns into one list LibreOffice-verified Sheets-executed
- How to combine two lists without duplicates LibreOffice-verified Sheets-executed
- How to compare two columns row by row LibreOffice-verified Sheets-executed
- How to count items in a comma-separated cell LibreOffice-verified Sheets-executed
- How to count unique values that match a condition LibreOffice-verified Sheets-executed
- How to count the number of unique values in a range LibreOffice-verified Sheets-executed
- How to count only visible rows after filtering LibreOffice-verified Sheets-executed
- How to fill blank cells with the value above LibreOffice-verified Sheets-executed
- How to FILTER by multiple criteria (AND / OR) LibreOffice-verified Sheets-executed
- How to find duplicate values in a column LibreOffice-verified Sheets-executed
- How to find the cell address of a value LibreOffice-verified Sheets-executed
- How to look up the closest match (tax brackets, tiers, grades) LibreOffice-verified Sheets-executed
- How to find the last value in a column LibreOffice-verified Sheets-executed
- How to find the most frequent number in a range LibreOffice-verified Sheets-executed
- How to find the original price before a discount LibreOffice-verified Sheets-executed
- How to find the row number of a value LibreOffice-verified Sheets-executed
- How to find the label that goes with the highest value LibreOffice-verified Sheets-executed
- How to find values that appear in both of two lists LibreOffice-verified Sheets-executed
- How to find the position of the maximum value LibreOffice-verified Sheets-executed
- How to get unique values (remove duplicates) with a formula LibreOffice-verified Sheets-executed
- How to use the FILTER function LibreOffice-verified Sheets-executed
- How to use INDEX/MATCH LibreOffice-verified Sheets-executed
- How to use VLOOKUP (and the FALSE you must not forget) LibreOffice-verified Sheets-executed
- How to use XLOOKUP LibreOffice-verified Sheets-executed
- How to join a list of cells into one comma-separated string LibreOffice-verified Sheets-executed
- How to list the top N values LibreOffice-verified Sheets-executed
- How to look up the LAST matching value (not the first) LibreOffice-verified Sheets-executed
- How to look up a value with two criteria (multi-condition lookup) LibreOffice-verified Sheets-executed
- How to VLOOKUP with a partial match (contains) LibreOffice-verified Sheets-executed
- How to find the 2nd (or Nth) largest or smallest value LibreOffice-verified Sheets-executed
- How to pick a random item from a list LibreOffice-verified Sheets-executed
- How to reference a cell on another sheet LibreOffice-verified Sheets-executed
- How to remove blank cells from a list LibreOffice-verified Sheets-executed
- How to return ALL matches, not just the first (VLOOKUP for multiple results) LibreOffice-verified Sheets-executed
- How to return the entire row of a match LibreOffice-verified Sheets-executed
- How to reverse the order of a list LibreOffice-verified Sheets-executed
- How to sort with a formula (a live-sorted copy) LibreOffice-verified Sheets-executed
- How to sum only the filtered (visible) rows LibreOffice-verified Sheets-executed
- How to transpose rows to columns (or columns to rows) LibreOffice-verified Sheets-executed
- How to look up a value by both row and column (two-way lookup) LibreOffice-verified Sheets-executed
- How to VLOOKUP from another sheet LibreOffice-verified Sheets-executed
- How to VLOOKUP to the left (return a value from a column before the match) LibreOffice-verified Sheets-executed
- How to XLOOKUP from another sheet LibreOffice-verified Sheets-executed
- How to return a default value when a lookup finds nothing LibreOffice-verified Sheets-executed
Counting & conditions
- How to calculate a discounted price LibreOffice-verified Sheets-executed
- How to check if a bit (flag) is set LibreOffice-verified Sheets-executed
- How to count blank cells in a range LibreOffice-verified Sheets-executed
- How to count cells between two values LibreOffice-verified Sheets-executed
- How to count cells by color (and why formulas can't see color) LibreOffice-verified Sheets-executed
- How to count cells greater than a value LibreOffice-verified Sheets-executed
- How to count cells not equal to a value LibreOffice-verified Sheets-executed
- How to count cells that contain errors LibreOffice-verified Sheets-executed
- How to count checked checkboxes LibreOffice-verified Sheets-executed
- How to count non-blank (non-empty) cells LibreOffice-verified Sheets-executed
- How to count how many times a value appears in a range LibreOffice-verified Sheets-executed
- How to count occurrences of a substring in a cell LibreOffice-verified Sheets-executed
- How to count with multiple criteria (COUNTIFS) LibreOffice-verified Sheets-executed
- How to COUNTIF across multiple columns LibreOffice-verified Sheets-executed
- How to create a frequency distribution (count values in bins) LibreOffice-verified Sheets-executed
- How to hide formula errors (show 0 or blank instead of #DIV/0!, #N/A) LibreOffice-verified Sheets-executed
- How to use the COUNTIF function LibreOffice-verified Sheets-executed
- How to use COUNTIFS (count with multiple conditions) LibreOffice-verified Sheets-executed
- How to use the IF function LibreOffice-verified Sheets-executed
- How to use IFERROR LibreOffice-verified Sheets-executed
- How to test if a value is between two numbers LibreOffice-verified Sheets-executed
- How to write an IF with multiple conditions (AND / OR) LibreOffice-verified Sheets-executed
- How to find the maximum value that meets a condition (MAX IF) LibreOffice-verified Sheets-executed
- How to calculate a median with a condition (MEDIANIF) LibreOffice-verified Sheets-executed
- How to find the minimum value with a condition LibreOffice-verified Sheets-executed
- How to write nested IF statements LibreOffice-verified Sheets-executed
- How to rank values (highest = 1) with a formula LibreOffice-verified Sheets-executed
- How to rank values within groups LibreOffice-verified Sheets-executed
- How to rank values without ties LibreOffice-verified Sheets-executed
- How to get a running count of occurrences LibreOffice-verified Sheets-executed
- How to sum values where a checkbox is checked LibreOffice-verified Sheets-executed
- How to SUMIF across a row (horizontal SUMIF) LibreOffice-verified Sheets-executed
- How to SUMIF from another sheet LibreOffice-verified Sheets-executed
- How to SUMIF with OR criteria (this value or that one) LibreOffice-verified Sheets-executed
Formatting & display
- How to abbreviate large numbers as K and M LibreOffice-verified Sheets-executed
- How to display a decimal as a fraction LibreOffice-verified Sheets-executed
- How to display zero as a dash LibreOffice-verified Sheets-executed
- How to make a formula return blank instead of zero LibreOffice-verified Sheets-executed
- How to show a plus sign on positive numbers LibreOffice-verified Sheets-executed
- How to stop numbers showing as scientific notation (1.23E+11) LibreOffice-verified Sheets-executed
Math, money & stats
- How to add tax to a price (and back it out again) LibreOffice-verified Sheets-executed
- How to auto-number rows with a formula LibreOffice-verified Sheets-executed
- How to calculate a monthly loan payment LibreOffice-verified Sheets-executed
- How to calculate a percentile LibreOffice-verified Sheets-executed
- How to calculate a ratio like 16:9 LibreOffice-verified Sheets-executed
- How to calculate a z-score LibreOffice-verified Sheets-executed
- How to calculate CAGR (compound annual growth rate) LibreOffice-verified Sheets-executed
- How to calculate compound interest LibreOffice-verified Sheets-executed
- How to calculate IRR (internal rate of return) LibreOffice-verified Sheets-executed
- How to calculate profit margin (and not confuse it with markup) LibreOffice-verified Sheets-executed
- How to calculate simple interest LibreOffice-verified Sheets-executed
- How to calculate standard deviation (STDEV.S vs STDEV.P) LibreOffice-verified Sheets-executed
- How to calculate the break-even point LibreOffice-verified Sheets-executed
- How to calculate the coefficient of variation LibreOffice-verified Sheets-executed
- How to calculate the correlation between two columns LibreOffice-verified Sheets-executed
- How to calculate the future value of an investment LibreOffice-verified Sheets-executed
- How to calculate the geometric mean LibreOffice-verified Sheets-executed
- How to calculate the median (and when to prefer it over average) LibreOffice-verified Sheets-executed
- How to calculate the range (max minus min) LibreOffice-verified Sheets-executed
- How to clamp (limit) a value between a minimum and maximum LibreOffice-verified Sheets-executed
- How to convert a number to hex or binary LibreOffice-verified Sheets-executed
- How to convert APR to APY LibreOffice-verified Sheets-executed
- How to convert between units (miles, km, kg, °F…) LibreOffice-verified Sheets-executed
- How to convert hex or binary to a number LibreOffice-verified Sheets-executed
- How to convert Yes/No (or TRUE/FALSE) to 1 and 0 LibreOffice-verified Sheets-executed
- How to calculate the difference from the previous row LibreOffice-verified Sheets-executed
- How to find what percentile a value falls in LibreOffice-verified Sheets-executed
- How to generate random numbers LibreOffice-verified Sheets-executed
- How to get the absolute value (and sum absolute values) LibreOffice-verified Sheets-executed
- How to use ROUND (and ROUNDUP, ROUNDDOWN) LibreOffice-verified Sheets-executed
- How to use the SUMIF function LibreOffice-verified Sheets-executed
- How to use SUMIFS (sum with multiple conditions) LibreOffice-verified Sheets-executed
- How to linearly interpolate between two points LibreOffice-verified Sheets-executed
- How to find the minimum value excluding zeros LibreOffice-verified Sheets-executed
- How to multiply two columns (and total the result) LibreOffice-verified Sheets-executed
- How to normalize data to a 0-1 scale LibreOffice-verified Sheets-executed
- How to calculate progressive tax with brackets in one formula LibreOffice-verified Sheets-executed
- How to calculate the remaining balance on a loan LibreOffice-verified Sheets-executed
- How to round line items before summing (and why totals look 'off by a cent') LibreOffice-verified Sheets-executed
- How to round a number to the nearest multiple (5, 10, 0.25...) LibreOffice-verified Sheets-executed
- How to round to two decimal places (properly) LibreOffice-verified Sheets-executed
- How to round up to the nearest 5 or 10 LibreOffice-verified Sheets-executed
- How to track a running maximum (record high so far) LibreOffice-verified Sheets-executed
- How to make a running (cumulative) total LibreOffice-verified Sheets-executed
- How to subtract in a spreadsheet LibreOffice-verified Sheets-executed
- How to sum a column that contains errors LibreOffice-verified Sheets-executed
- How to sum a column LibreOffice-verified Sheets-executed
- How to sum values by category (conditional sum) with SUMIF LibreOffice-verified Sheets-executed
- How to sum every nth row LibreOffice-verified Sheets-executed
- How to sum non-adjacent cells and ranges LibreOffice-verified Sheets-executed
- How to sum only positive (or only negative) numbers LibreOffice-verified Sheets-executed
- How to sum the same cell across multiple sheets (3D reference) LibreOffice-verified Sheets-executed
- How to sum the top N values in a range LibreOffice-verified Sheets-executed
- How to sum where another column is not blank LibreOffice-verified Sheets-executed
- How to sum with multiple criteria (SUMIFS) LibreOffice-verified Sheets-executed
- How to calculate tiered sales commission in one formula LibreOffice-verified Sheets-executed
- How to calculate the total interest paid on a loan LibreOffice-verified Sheets-executed
- How to SUMIF with a wildcard (sum rows that start with / contain text) LibreOffice-verified Sheets-executed