¡@¼ÊºÙ: 温©_ ¡@ÀY»Î: ij½×ªÌ
¤¤¾Ç¥Í
- ©«¤l
- 104
- ¥DÃD
- 5
- ºëµØ
- 0
- ¿n¤À
- 110
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- Office2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2017-11-14
- ³Ì«áµn¿ý
- 2019-4-30
|
¦^´_ 6# hkyan
¥i¥H·j´MAsc¨ç¼Æ¦r¤¸½X¹ï·Óªí¬Ý¬Ý¡A
¤U±¬Oקï-³oӲŸ¹¡A¦r¤¸½X¬°45¡A¦bFunction¤¤ªºSelect Case¤¤¥[¤J¤@Ó±ø¥ó§Y¥i¡C
µù¸Ñ§Ú¦A¥´¸Ô²Ó¤@ÂI¡C- Private Sub CommandButton1_Click()
- For Each aa In Sheets("¤u§@ªí1").Range([A1], [A1].End(xlDown))'°j°éŪ¨úAÄæ©Ò¦³¸ê®Æ¡A©¹¤UŪ¨ú
- For i = 1 To Len(aa)'°j°é¸ÓÄæ¦ì¤å¦r¤¤ªø«×
- If Mid(aa, i, 1) = "," And Mid(aa, i + 1, 1) <> " " Then'¦pªGŪ¨ì³r¸¹¨Ã½T»{«á¤è¬O§_¤£¬°ªÅ¥Õ¡A¨âªÌ±ø¥ó§¡²Å¦X°õ¦æ³r¸¹«á±¥[¤JªÅ¥Õ¡A¦pªG±ø¥ó§¡¤£¦¨¥ß·í«e¤å¦r¥[¤Jar¦r¦ê¤¤
- ar = ar & ", "
- Else
- ar = ar & Mid(aa, i, 1)
- End If
- Next
- aa.Offset(, 1) = StrType(ar)'§PŪ¦r¦ê§¹²¦«áar¤¤ªº±ø¥ó¡A¸õ¤JFunctionµ{§Ç¡Aµ²ªG¦^¶Çaa©¹¥k¥[¤@®æ¦ì¸m
- ar = ""'²MªÅ¦r¦ê
- Next
- End Sub
- Function StrType(Mystr)
- For i = 1 To Len(Mystr)'°j°é¸ÓÄæ¦ì¤å¦r¤¤ªø«×
- k = AscW(Mid(Mystr, i))'¨ú±oªº¸Ó¤å¦rAsc¨ç¼ÆÂà´«¦r¤¸½X
- Select Case k'¿ï¨ú¦r¤¸½X²Å¦XCase¤¤þ¤@Ó±ø¥ó
- Case 32 'ªÅ®æ
- Textstring = Textstring & Mid(Mystr, i, 1)
- Case 48 To 57 '¼Æ¦r
- Textstring = Textstring & Mid(Mystr, i, 1)
- Case 65 To 90, 97 To 122 '^¤å
- Textstring = Textstring & Mid(Mystr, i, 1)
- Case 0 To 44, 46 To 47, 58 To 64, 91 To 96, 122 To 255 '²Å¸¹
- Textstring = Textstring & ""
- Case 45 '¹³¬O³o¸Ì - ³oӲŸ¹ªº¦r¤¸½X¬°45¡A¦b¦r¦ê¤¤§â¥¦§ï¬°ªÅ®æ´N¥i¥H
- Textstring = Textstring & " "
- End Select
- Next
- StrType = "MR " & Textstring'¦r¦ê§¹²¦«á¦b¦r¦ê«e¥[¤JMR+ªÅ®æ¡A¦^¶Ç§¹¾ã¦r¦ê
- If Mid(StrType, 4, 1) = " " Then StrType = Mid(StrType, 1, 3) & Mid(StrType, 5, 99)'¦pªG¤å¦r¤¤²Ä¥|½X³o¤@Ó¦r¬°ªÅ¥Õ¡A«·s¦r¦ê1~3¤Î5~³Ì«á¤@½X¡Aµ¥¦P©ó§R°£²Ä¥|½XªÅ®æ
- End Function
½Æ»s¥N½X ³o¤äµ{§Ç¦³ÂI°½Ãi¡A¤£¦n·N«ä...ÁÙ¦³«Ü¦h¦a¤è¥i¥Hºë²ªº¦a¤è... |
|