ABCDEFGHIJKLMNOPQRSTUVWXYZ
1
2
IF Function — Complete Guide with 5 Working Examples
3
sheetsandcells.com/functions/if/ · The #1 most-searched Excel function
4
5
✓ Universal support — every Excel version, every platform
6
IF has been in Excel since version 1.0. Works identically in Excel 365, 2019, 2016, 2013, 2010, Google Sheets, LibreOffice, Apple Numbers. Case-insensitive. Supports up to 64 levels of nesting.
7
8
Sheet Map — What's Inside
9
10
2. Sales LogSame 24-row Q1 2026 sales data used across the whole function library.
11
3. Example 1 - Basic IFSimple threshold logic. Big deal vs standard. Foundation of everything.
12
4. Example 2 - IF + AND/ORCompound conditions. AND for all-must-match, OR for any-can-match.
13
5. Example 3 - Nested IFMulti-tier logic. Bronze/Silver/Gold/Platinum based on deal size.
14
6. Example 4 - IF vs IFSThe modern IFS() replacement for deep nesting. Side-by-side comparison.
15
7. Example 5 - IFERROR wrap
The protective clause. Graceful handling of division-by-zero and lookup failures.
16
8. Cheat Sheet10 must-know IF patterns you'll use every day.
17
9. Decision TreeVisual representation of nested IF branching.
18
19
20
⚠ The one gotcha to remember
21
Text outputs must be in quotes. =IF(A2>100, Big, Small) fails with NAME error because Excel thinks Big and Small are named ranges. Correct: =IF(A2>100, "Big", "Small"). Numbers and cell references do NOT need quotes.
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100