ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

¤j¶q¸ê®Æ¾ã²z

¤j¶q¸ê®Æ¾ã²z

¦U¦ì¦n
¦pªþ¥ó¤Î¹Ï1»¡©ú
¤u§@ªí"¤ñ¹ï" I3~IN3Àx¦s®æ¤ÎI3~IN3Àx¦s®æ¶ñ¤J¤W­­¼Æ¾Ú¤Î¤U­­¼Æ¾Ú
¤ñ¹ï¤u§@ªí"¸ê®Æ®w"¤¤¦U¦C¼Æ¾Ú¬O§_¦ì©ó¤W¤U­­¼Æ¾Ú¤¤
­Y¦b¤W¤U­­¼Æ¾Ú¤¤(§t¤W¤U­­)Åã¥Ü1
­Y¼Æ¾Ú¤j©ó¤W­­­È©Î¤p©ó¤U­­­È«hÅã¥Ü0
­Y¤W¤U­­¼Æ¾Ú¨ä¤¤1­Ó¬°ªÅ¥Õ,´N¤£¶i¦æ¤ñ¹ï
¨Ã±N¦U¦Cµ²ªG¦X­p

¹Ï1.jpg (268.56 KB)

¹Ï1.jpg

1101005-(¤W¤U­­).rar (114.53 KB)

ÁÂÁ½׾Â,ÁÂÁ¦U¦ì«e½ú
«á¾ÇÂǦ¹©«½m²ß°}¦C»PÅÞ¿è­È¹Bºâ,¾Ç²ß¤è®×¦p¤U,½Ð¦U¦ì«e½ú«ü±Ð

Option Explicit
Sub TEST_1()
Dim Brr, Crr, Arr, v, i&, j%, R&, C%
Dim S1 As Worksheet, S2 As Worksheet
Set S1 = Sheets("¸ê®Æ®w"): Set S2 = Sheets("¤ñ¹ï")
R = S1.Cells(Rows.Count, "B").End(xlUp).Row
C = S1.Cells(5, Columns.Count).End(xlToLeft).Column
Brr = Range(S1.Cells(R, "I"), S1.Cells(6, C))
Crr = Range(S2.[I3], S2.Cells(4, C))
ReDim Arr(1 To UBound(Brr), UBound(Brr, 2))
For j = 1 To UBound(Brr, 2)
   If (Crr(1, j) <> "") * (Crr(2, j) <> "") = 0 Then GoTo j01
   For i = 1 To UBound(Brr)
      v = Brr(i, j)
      If v = "" Then GoTo i01
      Arr(i, j) = (v >= Crr(1, j)) * (v <= Crr(2, j))
      Arr(i, 0) = Arr(i, 0) + Arr(i, j)
i01: Next
j01: Next
S2.[H6].Resize(UBound(Arr), UBound(Arr, 2) + 1) = Arr
S2.Range("B6:B" & R) = S1.Range("B6:B" & R).Value
Set S1 = Nothing: Set S2 = Nothing: Erase Brr, Crr, Arr
End Sub
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

¦^´_ 5# ­ã´£³¡ªL


    ·P®¦ÁÂÁÂ

TOP

¦^´_ 10# samwang


    ÁÂÁ§A
³o¼Ë¯uªº«Ü§Ö

TOP

¦^´_  samwang


­Y·Q°w¹ïhÄd¤º¼Æ­È°µ¤@­Ó±Æ¦W
¤½¦¡¦p  =IF(H6="",0,SUMPRODUCT(($H$6H$500000>=H6 ...
oak0723-1 µoªí©ó 2022-6-5 23:21

·s¼W¬õ¦r¦p¤U¡A½Ð´ú¸Õ¬Ý¬Ý¡AÁÂÁÂ
Set xD = CreateObject("Scripting.Dictionary")
...
...
...
     .Range("h6").Resize(UBound(Crr)) = Crr
    .Range("i6").Resize(UBound(Brr), UBound(Brr, 2)) = Brr

'±Æ¦W
    With .Range(.[h6], .[h6].End(4))
        Arr = .Value
        .Sort Key1:=.Item(1), Order1:=2, Header:=2
        Brr = .Value: .Value = Arr
    End With
    For i = 1 To UBound(Brr)
        T = Brr(i, 1): If Not xD.Exists(T) Then n = n + 1: xD(T) = n
    Next
    For i = 1 To UBound(Arr): Arr(i, 1) = xD(Arr(i, 1)): Next
    .[g6].Resize(UBound(Arr)) = Arr
End With

TOP

¦^´_ 2# samwang


­Y·Q°w¹ïhÄd¤º¼Æ­È°µ¤@­Ó±Æ¦W
¤½¦¡¦p  =IF(H6="",0,SUMPRODUCT(($H$6:$H$500000>=H6)*(1/COUNTIF(H$6:H$500000,H$6:H$500000))))
À³¸Ó¦p¦ó?

¹Ï2.jpg (174.39 KB)

¹Ï2.jpg

TOP

¦^´_ 4# singo1232001


    ·P®¦
ÁÂÁÂ

TOP

¦^´_ 3# lpk187


    ·P®¦
ÁÂÁÂ

TOP

¦^´_ 2# samwang [/b

·P®¦
ÁÂÁÂ

TOP

Sub TEST_A1()
Dim Arr, Brr, Crr, R&, C%, V(3)
With Sheets("¸ê®Æ®w")
     Arr = Range(.Cells(Rows.Count, 2).End(3), .Cells(5, Columns.Count).End(1)(2))
     R = UBound(Arr): C = UBound(Arr, 2)
End With
Brr = Sheets("¤ñ¹ï").[b3].Resize(2, C)
ReDim Crr(1 To R, 1 To C)
For j = 8 To C
    V(1) = Brr(1, j): V(2) = Brr(2, j)
    If V(1) = "" Or V(2) = "" Then GoTo j01
    For i = 1 To R
        If j = 8 Then Crr(i, 1) = Arr(i, 1)
        V(3) = Arr(i, j): If V(3) = "" Then GoTo i01
        V(0) = (V(3) >= V(1)) * (V(3) <= V(2))
        Crr(i, j) = V(0)
        Crr(i, 7) = Crr(i, 7) + V(0)
i01: Next i
j01: Next j
Sheets("¤ñ¹ï").[b6].Resize(R, C) = Crr
End Sub

TOP

        ÀR«ä¦Û¦b : ¦³Ä@©ñ¦b¤ß¸Ì¡A¨S¦³¨­Åé¤O¦æ¡A¥¿¦p¯Ñ¥Ð¤£¼½ºØ¡A¬Ò¬OªÅ¹L¦]½t¡C
ªð¦^¦Cªí ¤W¤@¥DÃD