- ©«¤l
- 354
- ¥DÃD
- 5
- ºëµØ
- 0
- ¿n¤À
- 387
- ÂI¦W
- 0
- §@·~¨t²Î
- windows7
- ³nÅ骩¥»
- vba,vb,excel2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2017-1-8
- ³Ì«áµn¿ý
- 2024-8-2
|
¥»©«³Ì«á¥Ñ singo1232001 ©ó 2022-5-24 04:09 ½s¿è
¦^´_ 27# oak0723-1
Y§AÁÙn¦A§Ö
³o¸ÌÁÙ¦³¤@Ó¦A§Ö8%~15%ªº
¯ÊÂI¬O ¦Uªí±o¤À¤£·|ºâ ¤]¤£·|Åã¥Ü
¥u·|ºâ¥þ³¡ªí±o¤À¸ò±Æ¦W ·|Åã¥Ü
Y§Aªº°O¾ÐÅé³t«×2400 Mhz(¤u§@ºÞ²zû>®Ä¯à>¤º¥i¥H¬Ý°O¾ÐÅé³t«×)
14¸Uµ§¤j·§13¬í Yª©¦³Åã¥Üªº¤j·§14¬í ·sª©ªº§Ö8~15% (·íµM°O¾ÐÅé§Ö·|§ó§Ö)
Y§Aªº°O¾ÐÅé³t«×3200Mhz §Ú¥Î¥t¤@¥x3200¹q¸£´ú
14¸Uµ§¤j·§8.5¬í ª©ªº9¬í
±À¦ô°O¾ÐÅé3600Mhz¤j·§¥i¥H¨ì7¬í ³o¼Ë
¤j·§§ì1¸Uµ§0.6¬í (·íµMÁÙ¬On¬Ý¸ê®Æªº½ÆÂøµ{«×´£¤É ·|ªá§ó¦h®É¶¡)
Sub testFast()
TT = Timer '<¥iµù¸Ñ²¾°£
Set sh0 = Sheets("¿é¤J")
ReDim ar(1 To Sheets.Count - 1): w = 1 '¥D°}¦C 1ºû+2ºû¦hÄæ ¤§«á²V¥[10±iªí Á`¸ê®Æ
ar0 = sh0.[I3:IN3] '¦¸°}¦C0 2ºû1Äæ ¿é¤J.[I3:IN3] ¤§«á¤ñ¹ï¥Î
'ReDim ar1(1 To Sheets.Count - 1) '¦¸°}¦C1 1ºû+2ºû1Äæ 10±iªí ¤§«á²V¥[¦Uªí±o¤À¥[Á`
sh0.[i5:T1048576].ClearContents
For Each Z In Sheets
If Z.Name <> "¿é¤J" Then
ar(w) = Z.Range("I5:IN" & Z.Cells(Rows.Count, 2).End(3).Row) '¥D°}¦C ²V¥[2ºû¤£³W«h°}¦C
' ReDim ir(1 To UBound(ar(w)), 0)
' ar1(w) = ir
If MaxR < UBound(ar(w)) Then MaxR = UBound(ar(w))
w = w + 1
End If
Next
ReDim ar2(1 To MaxR, 0) As Integer '¦¸°}¦C2 2ºû1Äæ ¥[Á`10±iªíÁ`±o¤À
'For i = 1 To MaxR: ar2(i, 0) = 0: Next
For i = 1 To UBound(ar) '®Ú¾Ú¥D°}¦C»P¦¸°}¦C1¤ñ¹ïºâ¤À °O¿ý¦b¦¸°}¦C2
For j = 1 To 240 '10ªíÁ`¤À¬ö¿ý¦b¦¸°}¦C3
If ar0(1, j) <> "" Then '¬°ªÅ¤£ºâ
For k = 1 To UBound(ar(i))
If ar(i)(k, j) = ar0(1, j) Then '¿é¤J»P¸ê®Æ§PÂ_¬Û¦P
' ar1(i)(k, 0) = ar1(i)(k, 0) + 1 '¦Uªí ¸Ó¦C+1¤À
ar2(k, 0) = ar2(k, 0) + 1 'Á`ªí ¸Ó¦C+1¤À
If ar(i)(k, j) = "" Then
If ar0(1, j) = 0 Then
'ar1(i)(k, 0) = ar1(i)(k, 0) - 1 ' '¹J¨ì0="" §â¤À¼Æ¦©¦^¨Ó-1
ar2(k, 0) = ar2(k, 0) - 1 '¹J¨ì0="" §â¤À¼Æ¦©¦^¨Ó-1
End If
End If
End If
Next
End If
Next
Next
'For i = 1 To UBound(ar) '¦UªíÁ`¤À¨Ì§Ç©ñ¤J[I5:R1048576]
'sh0.Cells(5, i + 8).Resize(UBound(ar1(i)), 1) = ar1(i)
'Next
sh0.[s5].Resize(UBound(ar2), 1) = ar2 '¥þ³¡Á`¤À©ñ¤J[S5:S1048576]
Set d = CreateObject("scripting.dictionary"): d.RemoveAll '¥h«
For i = 1 To UBound(ar2): d(ar2(i, 0)) = "": Next
d0 = d.keys() '¦¸°}¦C3
For i = 0 To d.Count - 1 '¦¸°}¦C3 ®ðªw±Æ§Ç
For j = i + 1 To d.Count - 1
If d0(i) < d0(j) Then tp = d0(i): d0(i) = d0(j): d0(j) = tp
Next
Next
ReDim d1(0 To d0(0)) '±o¤ÀÂà±Æ¦W
For i = 0 To UBound(d0): d1(d0(i)) = i + 1: Next '³Ðd1±Æ¦W¹ï·Óªí°}¦C
For i = 1 To UBound(ar2): ar2(i, 0) = d1(ar2(i, 0)): Next '¨Ì¹ï·Óªíindexק隸°}¦C3
sh0.[T5].Resize(UBound(ar2), 1) = ar2 '¥þ³¡±Æ¦W©ñ¤J[T5:T1048576]
sh0.[A1] = Format(Timer - TT, "0.0") '<¥iµù¸Ñ²¾°£
End Sub |
|