Untitled
3 years ago in VBScript
Sub GetStateNames()
Dim cell As Range
For Each cell In Range("j:j")
If cell.Value <> "" Then
If cell.Value = "AL" Then
cell.Value = "Alabama"
ElseIf cell.Value = "AK" Then
cell.Value = "Alaska"
ElseIf cell.Value = "AZ" Then
cell.Value = "Arizona"
ElseIf cell.Value = "AR" Then
cell.Value = "Arkansas"
ElseIf cell.Value = "CA" Then
cell.Value = "California"
ElseIf cell.Value = "CO" Then
cell.Value = "Colorado"
ElseIf cell.Value = "CT" Then
cell.Value = "Connecticut"
ElseIf cell.Value = "DE" Then
cell.Value = "Delaware"
ElseIf cell.Value = "FL" Then
cell.Value = "Florida"
ElseIf cell.Value = "GA" Then
cell.Value = "Georgia"
ElseIf cell.Value = "HI" Then
cell.Value = "Hawaii"
ElseIf cell.Value = "ID" Then
cell.Value = "Idaho"
ElseIf cell.Value = "IL" Then
cell.Value = "Illinois"
ElseIf cell.Value = "IN" Then
cell.Value = "Indiana"
ElseIf cell.Value = "IA" Then
cell.Value = "Iowa"
ElseIf cell.Value = "KS" Then
cell.Value = "Kansas"
ElseIf cell.Value = "KY" Then
cell.Value = "Kentucky"
ElseIf cell.Value = "LA" Then
cell.Value = "Louisiana"
ElseIf cell.Value = "ME" Then
cell.Value = "Maine"
ElseIf cell.Value = "MD" Then
cell.Value = "Maryland"
ElseIf cell.Value = "MA" Then
cell.Value = "Massachusetts"
ElseIf cell.Value = "MI" Then
cell.Value = "Michigan"
ElseIf cell.Value = "MS" Then
cell.Value = "Mississippi"
ElseIf cell.Value = "MO" Then
cell.Value = "Missouri"
ElseIf cell.Value = "MN" Then
cell.Value = "Minnesota"
ElseIf cell.Value = "MT" Then
cell.Value = "Montana"
ElseIf cell.Value = "NE" Then
cell.Value = "Nebraska"
ElseIf cell.Value = "NV" Then
cell.Value = "Nevada"
ElseIf cell.Value = "NH" Then
cell.Value = "New Hampshire"
ElseIf cell.Value = "NJ" Then
cell.Value = "New Jersey"
ElseIf cell.Value = "NM" Then
cell.Value = "New Mexico"
ElseIf cell.Value = "NY" Then
cell.Value = "New York"
ElseIf cell.Value = "NC" Then
cell.Value = "North Carolina"
ElseIf cell.Value = "ND" Then
cell.Value = "North Dakota"
ElseIf cell.Value = "OH" Then
cell.Value = "Ohio"
ElseIf cell.Value = "OK" Then
cell.Value = "Oklahoma"
ElseIf cell.Value = "OR" Then
cell.Value = "Oregon"
ElseIf cell.Value = "PA" Then
cell.Value = "Pennsylvania"
ElseIf cell.Value = "RI" Then
cell.Value = "Rhode Island"
ElseIf cell.Value = "SC" Then
cell.Value = "South Carolina"
ElseIf cell.Value = "SD" Then
cell.Value = "South Dakota"
ElseIf cell.Value = "TN" Then
cell.Value = "Tennessee"
ElseIf cell.Value = "TX" Then
cell.Value = "Texas"
ElseIf cell.Value = "UT" Then
cell.Value = "Utah"
ElseIf cell.Value = "VT" Then
cell.Value = "Vermont"
ElseIf cell.Value = "VA" Then
cell.Value = "Virginia"
ElseIf cell.Value = "WA" Then
cell.Value = "Washington"
ElseIf cell.Value = "WV" Then
cell.Value = "West Virginia"
ElseIf cell.Value = "WI" Then
cell.Value = "Wisconsin"
ElseIf cell.Value = "WY" Then
cell.Value = "Wyoming"
End If
End If
Next cell
End Sub