- ©«¤l
- 976
- ¥DÃD
- 7
- ºëµØ
- 0
- ¿n¤À
- 1018
- ÂI¦W
- 0
- §@·~¨t²Î
- Win10
- ³nÅ骩¥»
- Office 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-4-19
- ³Ì«áµn¿ý
- 2024-12-18
|
¦^´_ 14# oak0723-1
§Ú¼W¥[¸ê®Æ¦C¼Æ©MÄæ¼Æ
µo²{¤£¯àÀH¼W´î¸ê®Æ¼ÆÅܰʤñ¹ïµ²ªG
>> ¤w§ó·s¡A½Ð¦A´ú¸Õ¬Ý¬Ý¡AÁÂÁÂ
Sub test()
Dim Arr, Drr, Brr(), Crr(), T, XMax, XMin, R%, C%
Tm = Timer
With Sheets("¸ê®Æ®w")
R = .[b6].End(4).Row
C = .Cells(5, Columns.Count).End(1).Column
Arr = .Range(.[b6], .Cells(R, 2))
Drr = .Range(.[i6], .Cells(R, C))
End With
With Sheets("¤ñ¹ï")
.[b6].Resize(UBound(Arr)) = Arr
ReDim Brr(1 To UBound(Arr), 1 To UBound(Drr, 2))
ReDim Crr(1 To UBound(Arr), 1 To 1)
C = .Cells(3, Columns.Count).End(1).Column
Arr = .Range(.[i3], .Cells(4, C))
For i = 1 To UBound(Drr)
Crr(i, 1) = 0
For j = 1 To UBound(Arr, 2)
T = Drr(i, j): XMin = Arr(1, j): XMax = Arr(2, j)
If XMin = "" Or T = "" Then Brr(i, j) = "": GoTo 99
If T < XMin Or T > XMax Then
Brr(i, j) = 0
Else
Brr(i, j) = 1: Crr(i, 1) = Crr(i, 1) + 1
End If
99: Next j
Next i
.Range("h6").Resize(UBound(Crr)) = Crr
.Range("i6").Resize(UBound(Brr), UBound(Brr, 2)) = Brr
End With
MsgBox Timer - Tm
End Sub |
|