- ©«¤l
- 2834
- ¥DÃD
- 10
- ºëµØ
- 0
- ¿n¤À
- 2890
- ÂI¦W
- 0
- §@·~¨t²Î
- ¡e²¤¡f
- ³nÅ骩¥»
- ¡e²¤¡f
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¡e²¤¡f
- µù¥U®É¶¡
- 2013-5-13
- ³Ì«áµn¿ý
- 2024-11-21
|
¥ú¡e½Æ»s¡D¶K¤W¡f´Nn¯Ó¶O¤j¥b¤Ñ®É¶¡¡A¤×¨ä¤å¦r©Î¤½¦¡§ó¯Ó®É¡A
¨Ï¥Î°}¦Cª½±µ¹Bºâ¨ú¥Xµ²ªG¦A¶K¤J¡A¦]§PÂ_È¥u¦³¢¯¤Î¢°¡A¶K¤J®ÉÁÙºâ§Ö¡A
Áö¬O³Ì°ò¥»ªº¡e°}¦C¡Darray¡f¹B¥Î¡A¦ý¹ïªì¾ÇªÌ¤]»á¦³Ãø«×¡A®¤µLªk¸Ñ»¡¡A°Ñ¦Ò§Y¥i¡G
test01.rar (139.58 KB)
¡@
Y¸ê®Æ¤Ó¦h¡A¥i¯à³y¦¨°O¾ÐÅ餣¨¬°ÝÃD¡A¸Õ¸Õ¬Ý¡I
§Ú¥u´¡ªá¡A¦¹½×¾Â¦UªO¥D¬Ò¬O±M·~°ª¤â¡A¥i½Ð¨D¨ä¨ó§U¡I
¡@
Sub ¤ÀªR()
Dim Srr, Sht As Worksheet, Arr, Brr, Crr, X, Y, Z, R, TM
Dim i&, j&, k%, M, Mrr(1 To 2560, 1 To 2), S&, SU&
TM = Timer
R = [data!C65536].End(xlUp).Row
Arr = [Data!C1:D1].Resize(R)
X = [Data!I4]: If X < 2 Then X = 2
Y = [Data!J4]: If Y > R Then Y = R
Z = Y - X + 1: If Z <= 0 Then Exit Sub
ReDim Crr(X To Y, 1 To 256)
Application.ScreenUpdating = False
For i = 1 To 10
Set Sht = Sheets("ªR" & i)
Brr = Sht.Rows(1)
For k = 1 To 256
M = M + 1
For j = X To Y
If Brr(1, k) <= Arr(j, 1) And Brr(1, k) >= Arr(j, 2) Then S = 1
Crr(j, k) = S: SU = SU + S: S = 0
Next j
Mrr(M, 1) = Brr(1, k): Mrr(M, 2) = SU: SU = 0
Next k
Sht.UsedRange.Offset(1, 0).ClearContents
With Sht.[A2].Resize(Z, 256)
Sht.Rows(2).Copy .Cells
.Value = Crr
End With
Next i
Sheets("µ²ªG").[A3:B3].Resize(M) = Mrr
MsgBox Timer - TM
End Sub |
|