Asked • 01/27/21

How do I write an IF statement and embed another IF statement

The format of the IF statement is:


=IF(logical_test, value_if_true, value_if_false)


Example

=IF(A2 = "Pizza","Yes, Pizza","No")

Is cell A2 has Pizza, then it will return "Yes, Pizza" otherwise it will say "No"


To embed another IF statement within:


=IF(A2="Pizza",IF(B2="Cheese","Cheese Pizza","No"),"No")


If cell A2 has Pizza, then Excel checks to see if cell B2 has Cheese, then it will return "Cheese Pizza", otherwise it will say "No". If cell A2 does not have Pizza, it will return "No"


1 Expert Answer

By:

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.