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

[µo°Ý] vba ¦p¦ó»s§@ú¶O¬ö¿ý³æ

[µo°Ý] vba ¦p¦ó»s§@ú¶O¬ö¿ý³æ

¥»©«³Ì«á¥Ñ GBKEE ©ó 2015-11-29 10:31 ½s¿è

½Ð°Ý¦U¦ì«e½ú¡A¤p§Ì·Q»s§@¤@¥÷ú¶O¬ö¿ý¦pªþ¥ó¡A²­z»Ý¨D¥\¯à¦p¤U¡G
1.·í¤u§@ªí1ªºA2¶ñ¤J¾Ç¸¹¡AB2¶ñ¤J¤ë¥÷«á¡A¤u§@ªí2´N·|®Ú¾Ú¤ë¥÷¤Î¾Ç¸¹ªº¬Û¹ï¦ì¸m¶ñ¤J"¤wú"¦r¼Ë¡C
2.°²³]¤u§@ªí1ªºA2¶ñ¤J001(¾Ç¸¹)¡AB2¶ñ¤J6,7(¤ë¥÷)®É¡A¤u§@ªí2´N·|®Ú¾Ú¤ë¥÷¤Î¾Ç¸¹ªº¬Û¹ï¦ì¸m¶ñ¤J"¤wú"¦r¼Ë¡A¦ý¦A¦¸©ó¤u§@ªí1ªºA2¶ñ¤J002(¾Ç¸¹)¡AB2¶ñ¤J12(¤ë¥÷)®É¡A°£«O¯d«e¦¸001ªº"¤wú"¦r¼Ë¥~¡A·s¼W002ªº"¤wú"¦r¼Ë©ó¬Û¹ï¦ì¸m ú¶O¬ö¿ý.rar (8.02 KB)
§A²q!!

Sub ¤wú()
Dim xF As Range,  M
If [A2] = "" Then MsgBox "¾Ç¸¹¥¼¿é¤J ": Exit Sub
If [B2] = "" Then MsgBox "ú¶O¤ë¥÷¥¼¿é¤J ": Exit Sub
Set xF = [¤u§@ªí2!A:A].Find([A2], Lookat:=xlWhole)
If xF Is Nothing Then MsgBox "¾Ç¸¹¤£¦s¦b ": Exit Sub
For Each M In Split([B2], ",")
¡@¡@If Val(M) < 1 Or Val(M) > 12 Then MsgBox "ú¶O¤ë¥÷¿ù»~ ": Exit Sub
Next
For Each M In Split([B2], ",")
¡@¡@If IsNumeric(M) Then xF(1, M + 2) = "¤wú"
Next
MsgBox "¡ã¡ã¤w³B²z¡ã¡ã"
End Sub

TOP

¦^´_ 2# ­ã´£³¡ªL
¤Ó·PÁ±z¤F~
§A²q!!

TOP

        ÀR«ä¦Û¦b : °µ¦n¨Æ¤£¯à¤Ö§Ú¤@¤H¡A°µÃa¨Æ¤£¯à¦h§Ú¤@¤H¡C
ªð¦^¦Cªí ¤W¤@¥DÃD