0
0
Google Sheetsspreadsheet~10 mins

Managing rule priority in Google Sheets - Cell-by-Cell Formula Trace

Choose your learning style9 modes available
Sample Data

This data shows student scores in column A. We want to assign grades in column B based on score ranges with priority rules.

CellValue
A1Score
A285
A370
A455
A540
B1Grade
B2
B3
B4
B5
Formula Trace
=IF(A2>=80, "A", IF(A2>=60, "B", IF(A2>=50, "C", "F")))
Step 1: A2>=80
Step 2: 85>=80
Step 3: IF(TRUE, "A", IF(A2>=60, "B", IF(A2>=50, "C", "F")))
Cell Reference Map
    A       B
1 | Score | Grade
2 |  85   |  -> formula here
3 |  70   | 
4 |  55   | 
5 |  40   | 

Arrow points from A2 to formula in B2.
The formula in B2 uses the value in A2 to decide the grade.
Result
    A       B
1 | Score | Grade
2 |  85   |  A
3 |  70   | 
4 |  55   | 
5 |  40   | 

The formula in B2 returns 'A' because 85 is >= 80.
The grade 'A' appears in B2 because the score 85 meets the highest priority condition.
Sheet Trace Quiz - 3 Questions
Test your understanding
What grade will a score of 70 get with this formula?
AA
BB
CC
DF
Key Result
Nested IF statements check conditions in order, returning the first TRUE condition's result to manage priority.