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

½Ð°Ý«ç»òÅý¥¨¶°°õ¦æ¦¸¼Æ=¬Y­ÓÀx¦s®æ¤¤ªº­È

½Ð°Ý«ç»òÅý¥¨¶°°õ¦æ¦¸¼Æ=¬Y­ÓÀx¦s®æ¤¤ªº­È

¥»©«³Ì«á¥Ñ color790 ©ó 2011-6-30 13:20 ½s¿è

½Ð°Ý
¦pªG·Q±N¸Ó¥¨¶°°µX¦¸, X =¤u§@ªí1.Cells(a, 2)ªº­È¸Ó«ç»ò¥[¶i¥h, ©Î¬O¥i¥H«ç»ò­×§ï¤ñ¸û¦n~ ÁÂÁ¦U¦ì¥ý¶i
Sub AA()
a = ¤u§@ªí1.[A1].End(xlDown).Row
b = ¤u§@ªí1.Cells(a, 5)
Select Case b
Case "AAA"
For i = 2 To ¤u§@ªí3.[A1].End(xlDown).Row
For j = 2 To 5

If ¤u§@ªí3.Cells(i, j) = "" Then
¤u§@ªí3.Cells(i, j) = ¤u§@ªí1.Cells(a, 1)
¤u§@ªí3.Cells(i + 1, j) = ¤u§@ªí1.Cells(a, 1)
Exit Sub
End If
Next
Next

Case "BBB"
For i = 2 To ¤u§@ªí3.[A1].End(xlDown).Row
For j = 2 To 5

If ¤u§@ªí3.Cells(i, j) = "" Then
¤u§@ªí3.Cells(i, j) = ¤u§@ªí1.Cells(a, 1)
Exit Sub
End If
Next
Next
End Select
End Sub
ªì¾ÇªÌcolor

¥»©«³Ì«á¥Ñ Min ©ó 2011-7-1 06:37 ½s¿è

Sub AA()
for cnt= 1 to ¤u§@ªí1.Cells(a, 2)
a = ¤u§@ªí1.[A1].End(xlDown).Row
b = ¤u§@ªí1.Cells(a, 5)
Select Case b
Case "AAA"
.
.
.
.
next cnt
End Sub

©Î¬O¦b¼g­ÓSUB
Sub AA2()
for cnt= 1 to ¤u§@ªí1.Cells(a, 2)
call aa
next cnt
End Sub
­Y¬O§Ú¦^µª¡A¨Ï±zº¡·N¡A½Ð±zÅý§Úª¾¹D¡I                  
­Y¬O§Úªº¦^ÂСA±z¤´¦³¨ä¥L¨£¸Ñ¡A¤]½Ð±z¤£¶Þ«ü±Ð¡I

TOP

¦^´_ 1# color790
  1. Sub AA()
  2.     For a = 1 To ¤u§@ªí1.[A1].End(xlDown).Row
  3.         For i = 2 To ¤u§@ªí3.[A1].End(xlDown).Row
  4.             For j = 2 To 5
  5.                 If ¤u§@ªí3.Cells(i, j) = "" Then
  6.                     If ¤u§@ªí1.Cells(a, 5) = "AAA" Then
  7.                         ¤u§@ªí3.Cells(i, j) = ¤u§@ªí1.Cells(a, 1)
  8.                         ¤u§@ªí3.Cells(i + 1, j) = ¤u§@ªí1.Cells(a, 1)
  9.                         Exit Sub
  10.                     ElseIf ¤u§@ªí1.Cells(a, 5) = "BBB" Then
  11.                         ¤u§@ªí3.Cells(i, j) = ¤u§@ªí1.Cells(a, 1)
  12.                         Exit Sub
  13.                     End If
  14.                 End If
  15.             Next
  16.         Next
  17.     Next
  18. End Sub
½Æ»s¥N½X

TOP

Sub AA()
for cnt= 1 to ¤u§@ªí1.Cells(a, 2)
a = ¤u§@ªí1.[A1].End(xlDown).Row
b = ¤u§@ªí1.Cells(a,  ...
Min µoªí©ó 2011-7-1 06:35


³á~­ì¨Ó­°´N¥i¥H¤F, ¯u¬O¤Ó·PÁ§A¤F, ¤]ÁÂÁª©¥Dªº¦^ÂÐ
ªì¾ÇªÌcolor

TOP

        ÀR«ä¦Û¦b : ¤H¥Í¨S¦³©Ò¦³Åv¡A¥u¦³¥Í©Rªº¨Ï¥ÎÅv¡C
ªð¦^¦Cªí ¤W¤@¥DÃD