|
こんなことでしょうか?
Sub Test()
Dim srcName As String
Dim myRange As Range
Dim startRow As Long
Dim lastRow As Long
Dim k As Long
Dim s As String
srcName = "Education"
Set myRange = Range("A:A").Find(What:=srcName, LookAt:=xlWhole)
If Not myRange Is Nothing Then
startRow = myRange.Row + 3
lastRow = Cells(Rows.Count, 2).End(xlUp).Row
For k = startRow To lastRow
s = Cells(k, "B").Value
If s <> "" Then
If Left(s, 6) = "D.V.M." Then
Cells(k, "E").Value = "medical D"
ElseIf Left(s, 8) = "D.Med.Sc" Then
Cells(k, "E").Value = "Doctor"
ElseIf Left(s, 2) = "M." Then
Cells(k, "E").Value = "Master"
Else
Cells(k, "E").Value = "その他"
End If
End If
Next
End If
End Sub
|
|