IF practice in Google Sheets
IF works the same way in Google Sheets as in Excel: IF(condition, value_if_true, value_if_false). Text results go in quotes, and IFs can be nested inside each other.
- 1Pass or fail with IFThe passing score is 50. In C2, use IF to show "Pass" when the score in B2 is 50 or more, and "Fail" otherwise.
- 2Calculate a bonus with IFPremiumSellers with sales over 1000 get a 10% bonus; everyone else gets 0. In C2, use IF to calculate the bonus for B2.
- 3Three outcomes with nested IFPremiumGrade the score in B2: 90 or more is "A", 70 or more is "B", anything lower is "C". In C2, put a second IF inside the first.
- 4Flag missing values with ISBLANKPremiumIn D2, show "Missing" when the hours in B2 are blank, and otherwise the pay, B2*C2. Use IF with ISBLANK.
- 5Compare two cells with IFPremiumIn D2, show "Over budget" if the amount spent in C2 is more than the budget in B2, and "OK" if not.
Functions in this topic
Questions
Is IF in Google Sheets the same as in Excel?
Yes. It takes the same three arguments, and conditions with =, <>, <, >, AND and OR are written the same way.