- ©«¤l
- 1447
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 1471
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Excel 2010 & 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW
- µù¥U®É¶¡
- 2020-7-15
- ³Ì«áµn¿ý
- 2024-12-5
|
¥»©«³Ì«á¥Ñ Andy2483 ©ó 2023-5-31 15:07 ½s¿è
ÁÂÁ½׾Â,ÁÂÁ¦U¦ì«e½ú
«á¾ÇÂǦ¹©«½m²ß°}¦C»P¦r¨å,¾Ç²ß8#¼Ó½d¨Ò¤è®×¦p¤U,½Ð¦U¦ì«e½ú«ü±Ð
AAªí°õ¦æ«e:
¸ü¦ÜAAªí_°õ¦æµ²ªG:
AAªí_¨Ï¥ÎªÌ°õ¦æÀx¦s®æ½s¿è:
¼g¤JQQªí_°õ¦æµ²ªG:
Option Explicit
Public K%
Sub TEST()
Dim Qrr, Arr, Y, Z, i&, j&, T1$, T2$, TT$
Dim Q As Range, A As Range, Shq As Worksheet, Sha As Worksheet
Set Y = CreateObject("Scripting.Dictionary")
Set Sha = Sheets("AA"): Set Shq = Sheets("QQ")
Set Q = Range(Shq.[A1], Shq.UsedRange): Qrr = Q
For i = 1 To UBound(Qrr, 1) Step 19
For j = 2 To UBound(Qrr, 2) Step 9
T1 = Qrr(i, j): T2 = Qrr(i, j + 1): TT = T1 & "|" & T2
If T1 = "" Or T2 = "" Then GoTo j01
Set Y(TT) = Range(Q(i, j - 1), Q(i + 18, j + 7))
Y(TT & "|v") = Y(TT)
j01: Next
Next
Set A = Sha.[B1:J19]: Arr = A
T1 = Arr(1, 2): T2 = Arr(1, 3): TT = T1 & "|" & T2
If K = 1 Then A = Y(TT & "|v")
If K = 2 Then Set Q = Y(TT): Q = Arr
Set Y = Nothing: Set Q = Nothing: Set A = Nothing
Set Sha = Nothing: Set Shq = Nothing: Erase Qrr, Arr
End Sub
'================================
Sub ¸ü¦ÜAAªí()
K = 1: Call TEST
End Sub
'================================
Sub ¼g¤JQQªí()
K = 2: Call TEST
End Sub |
|