If statements

11
Click to continue

description

Learn how to create IF statements and NESTED IF statements for Excel etc.

Transcript of If statements

Page 1: If statements

Click to continue

Page 2: If statements

It answers the question, “Is this true or false?”, then proceeds to do something as a result.

Page 3: If statements

Is the value in column A larger than the value in column B?

  A B1 23 362 13 203 12 24 44 3255 100 106 3 507 40 100

Page 4: If statements

Logical test using operators (=, <, <=, >, >=)

Formula:

=IF(A2>B2,"yes","no")

If true, the cell displays Yes

If false, the cell

displays No

Page 5: If statements

First No Second No Is Column A bigger?

13 20 no

12 2 yes

44 325 no

100 10 yes

3 50 no

40 100 no

Page 6: If statements

=IF(n4="m", "y", "n")

Text must be put in apostrophes e.g. “y”

Page 7: If statements

=IF(R6=0,C6,"Paid")

The contents of C6 will be displayed if R6=0

C6 could contain another formula!

Page 8: If statements

=IF(E33=1, “Good", IF(E33=2, “Average", “Below Average”))

=IF(E33=1, “Good", “Below Average”))

This structure is repeated before the False value.

An extra bracket is added at the end

Page 9: If statements

= IF(G4>=80, "A", IF(G4>=65, "B",

IF(G4>=50, "C", IF(G4 >=45, "D", "Fail"))))

Page 10: If statements

Using AND + OR:

=IF((AND(P24=0)),"Breakeven",(IF((OR(P24>0)),"Profit", "loss")))

Using Named cells

=IF(Product=“Pencil", “Student is organised!”, “Student needs pencil!”)

Using Absolute cell references

=IF($R$6=“Prussian Blue”, “My favourite colour”, “Not so good!")

Page 11: If statements

The end

www.dragon-class.com