- 帖子
- 5923
- 主題
- 13
- 精華
- 1
- 積分
- 5986
- 點名
- 0
- 作業系統
- win10
- 軟體版本
- Office 2010
- 閱讀權限
- 150
- 性別
- 男
- 來自
- 台灣基隆
- 註冊時間
- 2010-5-1
- 最後登錄
- 2022-1-23
        
|
本帖最後由 GBKEE 於 2012-8-28 09:15 編輯
回復 7# 小俠客 - If InStr(raw.Cells(i, 3), "小學") + InStr(raw.Cells(i, 3), "初小") > 0 Then
- '條件 : 如不成立, 會判斷下一個ElseIf條件.一直到有ElseIf條件成立後會不再去判斷其餘的條件,離開此 IF ....Then ....Else ..... End If
- '不必 GoTo Define_unit
- vbtype = "primary"
- ElseIf InStr(raw.Cells(i, 3), "初中") + InStr(raw.Cells(i, 3), "國中") + InStr(raw.Cells(i, 3), "高中") > 0 Then
- vbtype = "secondary"
- ElseIf InStr(raw.Cells(i, 3), "大學") + InStr(raw.Cells(i, 3), "大專") > 0 Then
- vbtype = "Uni"
- ElseIf InStr(raw.Cells(i, 3), "研究所") + InStr(raw.Cells(i, 3), "博士") > 0 Then
- vbtype = "Master+"
- End If
- If InStr((raw.Cells(i, 3), "台灣") > 0 Then unit = "TW"
- If InStr((raw.Cells(i, 3), "香港") > 0 Then unit = "HK"
- If InStr((raw.Cells(i, 3), "美國") > 0 Then unit = "US"
複製代碼 |
|