is else if work on VBA code
in my excel C range contain state abbrivation of usa
C1= AL
C2= CA
C150= AL
i want to change this as the full form
C1=Alabama
C2=California
C150=Alabama
i am trying to do like this
Dim M As Long
M = Sheets("Sheet3").Range("D" & Rows.Count).End(xlUp).Row
For M = M To 1 Step -1
With Range("D" & M)
If Range("D" & M) = " AL" Then Range("D" & M) = "Alabama"
Else: If Range("D" & M) = " AK" Then Range("D" & M) = "Alaska"
(CONTINUE)
End If
End With
Next M
is the correct?
in my excel C range contain state abbrivation of usa
C1= AL
C2= CA
C150= AL
i want to change this as the full form
C1=Alabama
C2=California
C150=Alabama
i am trying to do like this
Dim M As Long
M = Sheets("Sheet3").Range("D" & Rows.Count).End(xlUp).Row
For M = M To 1 Step -1
With Range("D" & M)
If Range("D" & M) = " AL" Then Range("D" & M) = "Alabama"
Else: If Range("D" & M) = " AK" Then Range("D" & M) = "Alaska"
(CONTINUE)
End If
End With
Next M
is the correct?