'......其中一段
isdeli = False
s2 = ""
For i = 1 To Len(s1)
ch = Mid(s1, i, 1)
If Mid(s1, i, 1) = """" Then
isdeli = Not isdeli
Else
If isdeli Then
If ch <> "," Then
s2 = s2 & ch
End If
Else
s2 = s2 & ch
End If
End If
Next
s2 = Replace(s2, "--", "00") '儲存格內有"--",取代為"00"
Dim s2 As String
isdeli = False
s2 = ""
For i = 1 To Len(s1)
ch = Mid(s1, i, 1)
If Mid(s1, i, 1) = """" Then
isdeli = Not isdeli
Else
If isdeli Then
If ch <> "," Then
s2 = s2 & ch
End If
Else
If IsNumeric(ch) Then s2 = s2 & ch '若ch為數字則加入s2
End If
End If
Next
's2 = Replace(s2, "--", "00") '儲存格內有"--",取代為"00"作者: HSIEN6001 時間: 2012-5-24 01:49