MacOS – Nested IF statement in Numbers

macosnumbers

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?

Best Answer

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.