Untitled
6 months 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
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108