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

[µo°Ý] §ä´M¸ê®Æ«á¶K¦bÁ`ªí

[µo°Ý] §ä´M¸ê®Æ«á¶K¦bÁ`ªí

¤p§Ì¬O«Üµæ·s¤â
¥Ø«e·Q­n¸ê®Æ¤u§@­¶§ä«ü©w«~¦W»P¤U¦Cªí®æ«á½Æ»s¦bÁ`­¶
§Æ±æ½×¥x¤j­ô ¦³ªÅ¶¢®É ¥iÀ°À°°_­ÓÀY

´M§äªF¦è.rar (16.58 KB)

½ÐÀ°¦£

·s¤â

¦^´_ 1# °¨¾å«n

ÁÂÁ«e½úµoªí¦¹¥DÃD»P½d¨Ò
«á¾ÇÂǦ¹©«½m²ßVBA°}¦C,¾Ç²ß¤è®×¦p¤U,½Ð«e½ú°Ñ¦Ò

Option Explicit
Sub TEST()
Dim K$, i&, j%, C%, N&, Brr
Range([Á`ªí!A1], Sheets("Á`ªí").UsedRange).Offset(2, 1).Clear
Brr = Range([¸ê®Æ!IV3].End(xlToLeft), [¸ê®Æ!A65536].End(xlUp)(1, 2))
K = [Á`ªí!A2]: N = 8: C = UBound(Brr, 2)
For j = 1 To C
   If K <> Brr(1, j) Then
      For i = 1 To N + 1
         Brr(i, j) = ""
      Next
   End If
Next
[Á`ªí!B3].Resize(N + 1, C) = Brr
End Sub
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

¤è®×2 ½Ð«e½ú°Ñ¦Ò:

Option Explicit
Sub TEST_2()
Dim K$, i&, j%, C%, N&, Brr, Crr
Range([Á`ªí!A1], Sheets("Á`ªí").UsedRange).Offset(2, 1).Clear
Brr = Range([¸ê®Æ!IV3].End(xlToLeft), [¸ê®Æ!A65536].End(xlUp)(1, 2))
K = [Á`ªí!A2]: N = 8: C = UBound(Brr, 2)
ReDim Crr(1 To UBound(Brr), 1 To C)
For j = 1 To C
   If K = Brr(1, j) Then
      For i = 1 To N + 1
         Crr(i, j) = Brr(i, j)
      Next
   End If
Next
[Á`ªí!B3].Resize(N + 1, C) = Crr
End Sub
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

        ÀR«ä¦Û¦b : ¦n¨Æ­n´£±o°_¡A¬O«D­n©ñ±o¤U¡A¦¨´N§O¤H§Y¬O¦¨´N¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD