Nested IF Function: - The Nested IF Statement For This Example Is Made Up of 2 IF Functions. IF
Nested IF Function: - The Nested IF Statement For This Example Is Made Up of 2 IF Functions. IF
Nested IF Function
1
4/10/2015
function.
9 10
2
4/10/2015
=IF(B7<10000,3%*B7,
IF(B7<15000,5%*B7,8%*B7))
OR
=IF(B7>=15000,8%*B7,
IF(B7<10000,3%*B7,5%*B7))
17 18
3
4/10/2015
Example 3
– GPA <2.0, Not Eligible to Graduate
– GPA>=2.0 and <2.7, Pass
– GPA>=2.7 and <3.4, Pass with Credit
– GPA >=3.4, Distinction
How many IF statements would we need if we
use the Nested IF function to compute the Pass
status?
23 24
4
4/10/2015
=VLOOKUP(B3,F2:G5,2)
25 26
29 30
5
4/10/2015
Exercise 10 Exercise 10
• Name the range A2:D10 of the Item List as • VAT is to be applied only to those items that are
Items taxable.
• This involves 2 things:
– Getting Excel to decide whether to charge VAT on a
particular item
– If an item is taxable, Excel then needs to calculate the
tax on the item
31 32
Exercise 10 Exercise 10
• We can apply VAT only to those items that are To get the exact match:
taxable by combining the IF function and the
VLOOKUP function • Use VLOOKUP(A4,Items,4,0) if your table
=IF(VLOOKUP(A4,Items,4,0)="Yes",C4*VAT*D4,0) array is NOT sorted
• You can omit the last argument
• Note also that we have named the VAT cell G1 as
VLOOKUP(A4,Items,4) if your table array is
VAT and use this rather than the data value 16%.
This will allow us to easily change the VAT if the sorted
government changes it.
33 34