|
Sub mymacro()
Dim i As Long
For i = 1 To Sheet1.Rows.Count
Select Case Cells(i, 1).Value
Case "北京"
Cells(i, 2).Value = 1
Case "天津"
Cells(i, 2).Value = 2
Case "上海"
Cells(i, 2).Value = 3
Case "重庆"
Cells(i, 2).Value = 4
Case "东北"
Cells(i, 2).Value = 5
Case "华北"
Cells(i, 2).Value = 6
Case "华东"
Cells(i, 2).Value = 7
Case "华中"
Cells(i, 2).Value = 8
Case "华南"
Cells(i, 2).Value = 9
Case "西南"
Cells(i, 2).Value = 10
Case "西北"
Cells(i, 2).Value = 11
End Select
Next i
End Sub
|
|