Sub test()
Dim i As Integer
Dim j As Integer
For j = 1 To Sheets.Count
For i = 100 To 2 Step -1
If Sheets(j).Range("e" & i) = "男" Then
Sheets(j).Range("f" & i) = "先生"
Else
Sheets(j).Range("f" & i) = "女士"
End If
If Sheets(j).Range("b" & i) = "理工" Then
Sheets(j).Range("c" & i) = "LG"
ElseIf Sheets(j).Range("b" & i) = "文科" Then
Sheets(j).Range("c" & i) = "WK"
Else
Sheets(j).Range("c" & i) = "CJ"
End If
If Sheets(j).Range("d" & i) = "" Then
Sheets(j).Range("d" & i).EntireRow.Delete
End If
Next
Next
End Sub