Bird
Raised Fist0
Google Sheetsspreadsheet~15 mins

Cross-column conditional rules in Google Sheets - Real Business Scenario

Choose your learning style10 modes available

Start learning this pattern below

Jump into concepts and practice - no test required

or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Scenario Mode
👤 Your Role: You are a sales analyst at a retail company.
📋 Request: Your manager wants you to highlight sales records where the sales amount is above $500 and the customer rating is below 3. This will help identify high-value sales with low customer satisfaction.
📊 Data: You have a sales data table with columns: Order ID, Sales Amount, Customer Rating (1 to 5 scale), and Product Category.
🎯 Deliverable: Create a conditional formatting rule in Google Sheets that highlights rows meeting the criteria. Also, add a helper column that marks these rows with 'Check' for easy filtering.
Progress0 / 3 steps
Sample Data
Order IDSales AmountCustomer RatingProduct Category
10014504Electronics
10027002Home
10033005Garden
10048001Electronics
10052003Home
10066504Garden
10075502Electronics
10084003Home
1
Step 1: Add a new column named 'Check' in column E next to your data.
In cell E2, enter the formula: =IF(AND(B2>500, C2<3), "Check", "")
Expected Result
E2 shows 'Check' if Sales Amount > 500 and Customer Rating < 3, otherwise blank. For example, E2 is blank, E3 is 'Check' if conditions met.
2
Step 2: Copy the formula in E2 down to all rows of your data.
Drag the fill handle from E2 down to E9 (assuming 8 data rows).
Expected Result
Column E marks 'Check' only for rows where Sales Amount > 500 and Customer Rating < 3.
3
Step 3: Create a conditional formatting rule to highlight entire rows where the conditions are met.
Select range A2:D9. Go to Format > Conditional formatting. Under 'Custom formula is', enter: =AND($B2>500, $C2<3). Choose a fill color (e.g., light red). Click 'Done'.
Expected Result
Rows with Sales Amount > 500 and Customer Rating < 3 are highlighted in light red.
Final Result
Order ID | Sales Amount | Customer Rating | Product Category | Check
---------------------------------------------------------------
1001     | 450          | 4               | Electronics      | 
1002     | 700          | 2               | Home             | Check
1003     | 300          | 5               | Garden           | 
1004     | 800          | 1               | Electronics      | Check
1005     | 200          | 3               | Home             | 
1006     | 650          | 4               | Garden           | 
1007     | 550          | 2               | Electronics      | Check
1008     | 400          | 3               | Home             | 
Rows 1002, 1004, and 1007 have sales above $500 but customer ratings below 3.
These rows are marked with 'Check' and highlighted for easy review.
This helps focus on high-value sales that may need customer service attention.
Bonus Challenge

Create a summary table that counts how many 'Check' rows exist per Product Category.

Show Hint
Use the COUNTIFS function with criteria on the 'Check' column and Product Category column.

Practice

(1/5)
1. In Google Sheets, you want to check if the value in column A is greater than the value in column B for the same row. Which formula correctly returns TRUE or FALSE for this condition in row 2?
easy
A. =A2>B2
B. =IF(A2, B2)
C. =A2+B2
D. =IF(A2<B2, TRUE, FALSE)

Solution

  1. Step 1: Understand the comparison needed

    The question asks to check if the value in column A is greater than column B in the same row, which is a simple comparison.
  2. Step 2: Identify the correct formula syntax

    The formula =A2>B2 directly compares the two cells and returns TRUE or FALSE accordingly.
  3. Final Answer:

    =A2>B2 -> Option A
  4. Quick Check:

    Simple comparison formula =A2>B2 [OK]
Hint: Use direct comparison like =A2>B2 for cross-column checks [OK]
Common Mistakes:
  • Using IF without condition like IF(A2, B2)
  • Adding values instead of comparing
  • Using wrong comparison operators
2. Which of the following formulas correctly applies a conditional rule to return "Yes" if the value in column C is equal to the value in column D, otherwise "No", for row 3?
easy
A. =IF(C3=D3, "Yes", "No")
B. =IF(C3==D3, "Yes", "No")
C. =IF(C3=D3, Yes, No)
D. =IF(C3<>D3, "Yes", "No")

Solution

  1. Step 1: Understand the equality check syntax in Google Sheets

    Google Sheets uses a single equals sign = for comparison inside IF, not double equals.
  2. Step 2: Check the correct use of text strings in IF

    Text values must be in quotes, so "Yes" and "No" are correct.
  3. Final Answer:

    =IF(C3=D3, "Yes", "No") -> Option A
  4. Quick Check:

    Use single = and quotes for text in IF [OK]
Hint: Use single = for comparison and quote text in IF [OK]
Common Mistakes:
  • Using double == which causes error
  • Not quoting text strings
  • Using <> instead of = for equality
3. Given the formula =IF(AND(A2>10, B2<5), "Pass", "Fail") in cell C2, what will be the result if A2=12 and B2=3?
medium
A. TRUE
B. "Fail"
C. "Pass"
D. FALSE

Solution

  1. Step 1: Evaluate the AND condition with given values

    A2>10 is TRUE because 12>10, and B2<5 is TRUE because 3<5. AND(TRUE, TRUE) returns TRUE.
  2. Step 2: Apply IF based on AND result

    Since AND is TRUE, IF returns "Pass" as specified.
  3. Final Answer:

    "Pass" -> Option C
  4. Quick Check:

    AND(TRUE, TRUE) = TRUE, so IF returns "Pass" [OK]
Hint: Check each condition inside AND before IF [OK]
Common Mistakes:
  • Confusing AND logic with OR
  • Ignoring comparison operators
  • Expecting TRUE/FALSE instead of text output
4. You wrote this formula in cell D2: =IF(A2>B2, "Higher", "Lower"). But it always shows "Lower" even when A2 is greater than B2. What is the likely problem?
medium
A. The formula uses wrong comparison operator
B. The IF function syntax is incorrect
C. The formula needs to be entered as an array formula
D. Cells A2 or B2 contain text, not numbers

Solution

  1. Step 1: Understand why comparison might fail

    If A2 or B2 contain text (like numbers stored as text), the comparison A2>B2 may not work as expected.
  2. Step 2: Check formula syntax and usage

    The formula syntax is correct and does not require array formula. The issue is likely data type mismatch.
  3. Final Answer:

    Cells A2 or B2 contain text, not numbers -> Option D
  4. Quick Check:

    Text in number cells breaks numeric comparisons [OK]
Hint: Check cell data types if comparisons fail [OK]
Common Mistakes:
  • Assuming syntax error without checking data
  • Trying array formula unnecessarily
  • Using wrong operators like ==
5. You want to create a formula in column E that labels each row as "OK" if the value in column A is greater than column B and the value in column C is not empty. Otherwise, it should show "Check". Which formula correctly does this for row 2?
hard
A. =IF(A2>B2, IF(C2="", "OK", "Check"), "Check")
B. =IF(AND(A2>B2, C2<>""), "OK", "Check")
C. =IF(AND(A2>B2, NOT(ISBLANK(C2))), "OK", "Check")
D. =IF(OR(A2>B2, C2<>""), "OK", "Check")

Solution

  1. Step 1: Understand the conditions to combine

    The label "OK" requires both: A2>B2 and C2 not empty. This means both conditions must be true, so AND is needed.
  2. Step 2: Check formula options for correct logic

    =IF(AND(A2>B2, C2<>""), "OK", "Check") uses AND with A2>B2 and C2<>"" which means C2 is not empty. This matches the requirement exactly.
  3. Final Answer:

    =IF(AND(A2>B2, C2<>""), "OK", "Check") -> Option B
  4. Quick Check:

    Use AND for all conditions, check non-empty with <>"" [OK]
Hint: Use AND and <>"" to check multiple conditions and non-empty cells [OK]
Common Mistakes:
  • Using OR instead of AND
  • Using ISBLANK incorrectly
  • Nesting IF unnecessarily