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

[µo°Ý] ½Æ»s²Å¦X±ø¥ó¾ã¦C¸ê®Æ

½m²ß¥Î¨â­Ó¤Gºû°}¦C,¤@­Ó¤@ºû°}¦C³B²z

Sub TEST_20221214()
Dim Brr, C&, R&, T, Crr, N&
Brr = ¤u§@ªí1.UsedRange.Offset(1)
ReDim Crr(1 To UBound(Brr), 1 To UBound(Brr, 2))
T = Split("ABC,QWE,AA,BB", ",")
For R = 1 To UBound(Brr)
   If (Brr(R, 2) = T(0) Or Brr(R, 2) = T(1)) And (Brr(R, 3) = T(2) Or Brr(R, 3) = T(3)) Then
      If Trim(Brr(R, 5)) <> "" Then
         N = N + 1
         For C = 1 To UBound(Brr, 2)
            Crr(N, C) = Brr(R, C)
         Next
      End If
   End If
Next
¤u§@ªí2.UsedRange.Offset(3).Clear
With ¤u§@ªí2.[A4].Resize(N, UBound(Crr, 2))
   .Value = Crr
   .Sort key1:=.Item(1, 1), Header:=2, Orientation:=xlTopToBottom
End With
Set Brr = Nothing
Set Crr = Nothing
Erase T
End Sub
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

        ÀR«ä¦Û¦b : ¶¢¤HµL¼Ö½ì¡A¦£¤HµL¬O«D¡C
ªð¦^¦Cªí ¤W¤@¥DÃD