IF, IFS & nested conditions
Conditional logic with IF — single condition, AND/OR combinations, nested ladders, IFS for multi-branch, IFERROR/IFNA for safe defaults.
14 pages · 13 how-to, 1 error fix
How-to guides
How to hide #N/A and other formula errors
Replace #N/A, #DIV/0!, and other errors with a blank or a friendly message using IFERROR or IFNA. Works in Excel and Google Sheets.
How to sum if a cell contains specific text
Use SUMIF with wildcard criteria (*text*) to sum values in a column whenever a related column contains a specific substring.
How to write a nested IF formula
Chain multiple IF functions inside each other to test several conditions and return different results for each scenario.
How to write an IF with multiple conditions
Combine IF with AND or OR to test multiple conditions simultaneously and return a result based on whether all or any are true.
How to combine IF and AND
Use IF with AND to return a value only when all specified conditions are simultaneously true in Excel or Google Sheets.
How to combine IF and OR
Use IF with OR to return a value when at least one of several conditions is true in Excel or Google Sheets.
How to check if a cell is blank with IF
Use IF with ISBLANK or an empty string comparison to detect blank cells and return a custom value or skip calculations.
How to return a value if a cell contains text
Use IF with ISNUMBER and SEARCH to check if a cell contains specific text and return a custom result.
How to return blank instead of zero
Use IF to test for zero and return an empty string, keeping your spreadsheet clean and charts free of unwanted zero markers.
How to flag values over a threshold
Use IF with a comparison to label each cell as 'Above' or 'Below' a numeric threshold without manual inspection.
How to assign a letter grade from a score
Convert numeric scores to letter grades automatically using nested IF or IFS — no manual lookup tables needed.
Excel ≠ SheetsHow to categorize values into buckets
Group numeric values into named categories (buckets) using nested IF or a lookup table for clean, readable segmentation.
How to create a pass or fail formula
Return Pass or Fail based on a score or condition using a simple IF formula — works identically in Excel and Google Sheets.