If - Then Statements in Field Calculator

Discussion created by HudsonJasonMB on Dec 23, 2013
Latest reply on Dec 23, 2013 by rfairhur24
I have a pretty simple set of replace functions I need to complete in an attribute table.  I have a feature class with approximately 135k records with a "MUN" attribute representing the four digit code of the applicable municipality.  I have a new field called "MUNI" in which I wish to populate the correct Municipal name.  There are 12 municipalities.

I've worked on several variations of the code in field calculator but none seem to work; general syntax error.  Coding and languages were never my strong suit so it doesn't necessarily surprise me but nevertheless.  I had a working expression to do just this but it had been deleted.

If [MUN] = 0901 Then
[MUNI] = Bayonne
ELSEIF [MUN] = 0902 Then
[MUNI] = East Newark
ELSEIF [MUN] = 0903 Then
[MUNI] = Guttenberg
ELSEIF [MUN] = 0904 Then
[MUNI] = Harrison
ELSEFIF [MUN] = 0905 Then
[MUNI] = Hoboken
ELSEIF [MUN] = 0906 Then
[MUNI] = Jersey City
ELSEIF [MUN] = 0907 Then
[MUNI] = Kearny
ELSEIF [MUN]= 0908 Then
[MUNI] = North Bergen
ELSEIF [MUN] = 0909 Then
[MUNI] = Secaucus
ELSEIF [MUN] = 0910 Then
[MUNI] = Union City
ELSEIF [MUN] = 0911 Then
[MUNI] = Weehawken
ELSEIF [MUN] = 0912 Then
[MUNI] = West New York

A simple expression I should be able to build with little effort but not having done this for a bit is hanging me up!