This is an Excel formula with nested IF expressions:
=IF((B2="East"),4,IF((B2="West"),3,IF((B2="North"),2,IF((B2="South"),1,""))))
To accomplish this:
If cell B2 = "East"
return "4"
ElseIf cell B2 = "West"
return "3"
ElseIf cell B2 = "North"
return "2"
ElseIf cell B2 = "South"
return "1"
Else
return ""
Is it possible to write Excel formulas in such a "more readable" way and convert it to official syntax? Is there any tool for writing Excel formulas?
It may be a superuser question ... but only programmers can know the answer!
source
share