- ©«¤l
- 36
- ¥DÃD
- 10
- ºëµØ
- 0
- ¿n¤À
- 93
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- office 2007
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2018-2-27
- ³Ì«áµn¿ý
- 2022-2-25
|
¦^´_ 3# samwang
±z¦n¡A½Ð°Ý¦pªGn¸õ¹L¨BÆJ1ª½±µ±N¦W³æ¶K¦b¨BÆJ2¶K¤W¡A
¦A¥Ñ¨BÆJ2ªº¶K¨ì¨BÆJ3§Ú¸Ó¦p¦óקï©O¡HSub test2()
Dim Arr, Brr(1 To 1000, 1 To 3), Crr()
Dim i&, j&, n%, s%, m%, R%
Arr = [n13].CurrentRegion '¨Ó·½¸ê®Æ1
If Arr <> "" Then
For j = 1 To UBound(Arr, 2): For i = 1 To UBound(Arr)
If Arr(i, j) <> "" Then
If n < 7 Then n = n + 1 Else n = 1
s = s + 1: Brr(s, 1) = n
Brr(s, 2) = Arr(i, j): Brr(s, 3) = s
End If
Next i: Next j
[j13].Resize(s, 3) = Brr 'Âà¶K¨ì2
R = Int(s / 7) + 1: ReDim Crr(1 To R, 1 To 7): k = 1
For i = 1 To s
For j = 1 To 7
m = m + 1: If m > s Then GoTo 99
Crr(i, j) = Brr(m, 2)
Next
99: Next i
Range("a13").Resize(R, 7) = Crr 'Âà¶K¨ì3
Else
Range("a13").Resize(R, 7) = Crr 'Âà¶K¨ì3
End If
End Sub |
|