# Nested IF statement in Numbers

I am working on a table to tabulate mileage costs for my small business. I have 3 destinations I go to on a regular basis. I would like the address to automatically populate in the C cell if the expression is met in the B cell.

I have copied numerous equations from various websites, but have not been able to get any of the equations to work. The latest is pasted below.

``````IF((B88="SHADY GROVE METRO","15903 SOMMERVILLE DR",IF((B88="POR TRAIN STATION","CLAY STREET",IF(B88="BWI","7062 ELM ROAD",""))))))
``````

Am I even close?

It looks like you have a lot of extra parenthesis everywhere... give this a try.

``````IF(B88="SHADY GROVE METRO","15903 SOMMERVILLE DR",IF(B88="POR TRAIN STATION","CLAY STREET",IF(B88="BWI","7062 ELM ROAD","")))
``````

To provide a bit more detail, for every left paren (, you need a matching right paren ) to close the expression. Counting what you've shown, you have 5 left parens, and 6 right parens. This would likely cause an error due to the mismatch.

Additionally, each expression only needs one left paren to start it, not two.

• You are welcome @Beth! Please consider voting the answer up, as well as marking it as the correct answer if it was helpful. Thanks! Commented Dec 14, 2015 at 15:15

You are close. If I understand your expression correctly (B88=Client and C=Street) the correct expression is:

``````=IF(B88="SHADY GROVE METRO";"15903 SOMMERVILLE DR";IF(B88="POR TRAIN STATION";"CLAY STREET";IF(B88="BWI";"7062 ELM ROAD";"not defined")))
``````

Example:

I've added a "not defined" instead of an (empty) "" for if-false.