converting state name to 2 letters I have created an if statement in excel and h
ID: 3562698 • Letter: C
Question
converting state name to 2 letters
I have created an if statement in excel and have copied it down in the worksheet - it works
However- I need to add ND,SD,WV,TN,KY but since I have nested 7 IFS inside of the IF - it yells at me if I try to Add more- says in 2003 that I can not nest >7 funcctions inside of anotther function- not sure of how I can get around this and add the other 5 states from abovee.
=IF(C2="Michigan","MI",(IF(C2="Wisconsin","WI",(IF(C2="Iowa","IA",(IF(C2="Indiana","IN",(IF(C2="Illinois","IL",(IF(C2="Ohio","OH",(IF(C2="Minnesota","MN",(IF(C2="Pennsylvania","PA",""""))))))))))))))))))
thanks,
Explanation / Answer
The following formula will find the right state code - assuming that you (but you have to have the correct spelling in C2 to get this to work
=INDEX(C3:C15,MATCH(C2,B3:B15,0))
Illinois IL Indiana IN Iowa IO Kentucky KY Michigan MI Minnesota MN North Dakota ND Ohio OH Pennsylvania PA South Dakota SD Tennessee TN West Virginia WV Wisconsin WIRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.