Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.
Last reviewed:
=IF(OR(A2="Red",A2="Blue"),"Primary","Other")Computed by a real spreadsheet engine on the sample data below.
| Color | Category |
| Red | |
| Green | |
| Blue | |
| Yellow |
=IF(OR(A2="Red",A2="Blue"),"Primary","Other")→Primary
Edit the grid or formula, then run it through a real spreadsheet engine — no signup.
Sample data — click any cell to edit
Working on a sheet you inherited? Run the Auditor on the whole file first — it flags every #REF!, #N/A, broken column pattern, and inconsistent formula in seconds, free, no signup.
Yes: =IF(AND(A2>0,OR(B2="Yes",B2="Maybe")),"OK","No") tests that A2 is positive AND that B2 is either Yes or Maybe.
OR accepts up to 255 logical conditions.
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.
Error fixNested IF formulas not working in Excel and Google Sheets — fix bracket mismatches, wrong evaluation order, overlapping conditions, and the 64-nesting limit.
How-toUse SUMIF with wildcard criteria (*text*) to sum values in a column whenever a related column contains a specific substring.
How-toChain multiple IF functions inside each other to test several conditions and return different results for each scenario.
How-toCombine IF with AND or OR to test multiple conditions simultaneously and return a result based on whether all or any are true.
How-toUse IF with AND to return a value only when all specified conditions are simultaneously true in Excel or Google Sheets.
Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.
Last reviewed: