ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

½Ð±Ð§PÂ_¤¤¤å¦rªº»yªk ?

½Ð±Ð§PÂ_¤¤¤å¦rªº»yªk ?

°²¦p[a1]ªº²Ä2­Ó¦r¬°¤¤¤å¦r«h[a2]=1 ªº»yªk ?

if mid([a1],2,1) like ???? then  [a2]=1

¦^´_ 1# t8899
  1. Sub ex()
  2. mystr = Mid([A1], 2, 1)
  3. If mystr <> "" And Application.WorksheetFunction.Dbcs(mystr) = Application.WorksheetFunction.Asc(mystr) Then [A2] = 1 Else [A2] = 0
  4. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¥»©«³Ì«á¥Ñ luhpro ©ó 2015-4-30 22:13 ½s¿è
°²¦p[a1]ªº²Ä2­Ó¦r¬°¤¤¤å¦r«h[a2]=1 ªº»yªk ?

if mid([a1],2,1) like ???? then  [a2]=1
t8899 µoªí©ó 2015-4-30 15:17

³o¼Ë¤]¥i¥H :
  1. Sub nn()
  2.   Dim sStr$, lPos&
  3.   
  4.   sStr = Mid([A1], 2, 1)
  5.   If sStr <> "" Then
  6.     lPos = Asc(sStr)
  7.     If lPos <= 0 Then [A2] = 1 Else [A2] = 0
  8.   End If
  9. End Sub
½Æ»s¥N½X

TOP

³o¼Ë¤]¥i¥H :
luhpro µoªí©ó 2015-4-30 22:12

ÁÂÁÂ
§Ú§ä¨ì¤@­Ó³Ì²³æªº¡A¨Ñ°Ñ¦Ò
If Asc(mid([a1],2,1)) < 0 Then [a2]=1

TOP

ÁÂÁÂ
§Ú§ä¨ì¤@­Ó³Ì²³æªº¡A¨Ñ°Ñ¦Ò
If Asc(mid([a1],2,1)) < 0 Then [a2]=1
t8899 µoªí©ó 2015-5-1 08:59



§A¥i¥H Run ¤U­±¬Ý¬Ý

Sub xx()

[a1] = "1¥¬2"
If Asc(Mid([a1], 2, 1)) < 0 Then [a2] = 1
[a1] = "123"
If Asc(Mid([a1], 2, 1)) < 0 Then [a2] = 1

End Sub

TOP

§A¥i¥H Run ¤U­±¬Ý¬Ý

Sub xx()

[a1] = "1¥¬2"
If Asc(Mid([a1], 2, 1)) < 0 Then [a2] = 1
[ ...
bobomi µoªí©ó 2015-5-1 09:57

§Ú§â±zªº­È "1¥¬2"  "123"©ñ¤J a1 ´ú¸Õ¨S°ÝÃD
Sub MA3333_Click()
Dim k As Integer
For k = 1 To Len([A1])
If Asc(Mid([a1], k, 1)) < 0 Then
MsgBox Mid([a1], k, 1)
End If
Next
End Sub
¥t¥~¦A¸É§PÂ_¨ä¥L ­^¤å¡A¼Æ¦r........ªº¤èªk
§PÂ_0-9 ===>    If Mid([a1], 2, 1) Like "[0-9]" Then
[^A-Za-z]«D­^¤å¦r  [^0-9] «D¼Æ¦r   [^0-9A-Za-z] °£¤F­^¤å©M¼Æ¦r¤§¥~ªº¦r¤¸  
^ªí¥Ü¤£¬O

TOP

§A¤@©w­n°õ¦æ§Ú³o­Ó
§Ú§â Sub Name §ï¦¨ MA3333_Click() ¤F
½Ð§A¦A¥Î·Æ¹«ÂIÂI¬Ý

Sub MA3333_Click()

[a1] = "1¥¬2"
If Asc(Mid([a1], 2, 1)) < 0 Then [a2] = "1  ²Ä2¦r=¤¤¤å"
[a1] = "123"
If Asc(Mid([a1], 2, 1)) < 0 Then [a2] = "1  ²Ä2¦r=¤¤¤å"

End Sub

TOP

§A¤@©w­n°õ¦æ§Ú³o­Ó
§Ú§â Sub Name §ï¦¨ MA3333_Click() ¤F
½Ð§A¦A¥Î·Æ¹«ÂIÂI¬Ý

Sub MA3333_Click()
...
bobomi µoªí©ó 2015-5-1 10:19

¨S°ÝÃD°Ú! Book2.zip (7.93 KB)

TOP

¦^´_ 8# t8899

§Aªº¥Î·N¬O±ø¥ó¤£¦¨¥ß®É, ¤£­nÅý [A2] ¥Ñ 1 Åܦ^ 0, ¬O³o¼Ëªº¸Ü, ¨º´N¬O§Ú»~·|§Aªº­ì·NÅo

¤£µM¥¿±`¬OÀ³¸Ó³o¼Ë¼g

If Asc(Mid([a1], 2, 1)) < 0 Then [a2] = 1 else  [a2] = 0

TOP

ÁÂÁÂ
§Ú§ä¨ì¤@­Ó³Ì²³æªº¡A¨Ñ°Ñ¦Ò
If Asc(mid([a1],2,1)) < 0 Then [a2]=1
t8899 µoªí©ó 2015-5-1 08:59

§Ú¤§©Ò¥H·|¥Î
If sStr <> "" Then
³o¤@¦æªº­ì¦]¬O :
¦pªG [A1] Àx¦s®æªº¤º®e¥u¦³ 1 ­Ó­^¼Æ¦r ©Î¬O ¨S¦³¸ê®Æ,
¨º»ò Asc(mid([a1],2,1)) ·|¥X²{¿ù»~°T®§.

·íµM, ­ì¦¡­Y­n²¤Æ¬O¥i¥H§â lPos ®³±¼:
  1. Sub nn()
  2.   Dim sStr$
  3.   
  4.   sStr = Mid([A1], 2, 1)
  5.   If sStr <> "" Then
  6.     If Asc(sStr) <= 0 Then [A2] = 1 Else [A2] = 0
  7.   End If
  8. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ÀR§¤±`®¦¤v¹L¡B¶¢½Í²ö½×¤H«D¡C
ªð¦^¦Cªí ¤W¤@¥DÃD