This is an Excel formula with nested IF statements: =IF((B2=\"East\"),4,IF((B2=\"West\"),3,IF((B2=\"North\"),2,IF((B2=\"South\"),1,\"\"))))