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

EXCEL ¦Û°Ê¥[¤Jªí®æ

¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

¦^´_ 11# Andy2483


    ·PÁ¤j¤jªºÀ°¦£¡A°¨¤W¨Ó¬ã¨s

TOP

¦^´_ 10# Andy2483


    ·PÁÂANDY¤j¤j¡A¨º½Ð°Ý²M°£¶µ¥Ø¬O§_¤]¥i¥H°µ¨ì¦h¦C¤@¦¸²M°£¡H


¥H¤U¬O¥Ø«eªºµ{¦¡½X¡A¥u¯à¤@¦¸§R¤@¦C
Private Sub CommandButton2_Click()
Dim b As Integer
b = (ActiveCell.Row)
Range("A" & b & ":G" & b).ClearContents
End Sub

TOP

¥»©«³Ì«á¥Ñ Andy2483 ©ó 2023-10-24 07:26 ½s¿è

¦^´_ 13# sschristy


Private Sub CommandButton2_Click()
Dim xA As Range, xB As Range, xI As Range
Set xA = Range([A1], ActiveSheet.UsedRange)
Set xB = [A:G]
Set xI = Intersect(xA, xB)
xI.Offset(3, 0).ClearContents
End Sub

https://learn.microsoft.com/zh-t ... worksheet.usedrange
https://learn.microsoft.com/zh-t ... plication.intersect
https://learn.microsoft.com/zh-t ... /excel.range.offset
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

¥»©«³Ì«á¥Ñ Andy2483 ©ó 2023-10-25 07:45 ½s¿è

¦^´_ 13# sschristy


    ¥H¤U¬O½Æ²ßªº¤ß±oµù¸Ñ,½Ð«e½ú°Ñ¦Ò

Private Sub CommandButton2_Click()
Dim xA As Range, xB As Range, xI As Range
'¡ô«Å§i(xA,xB,xI)¦U¬OÀx¦s®æÅܼÆ
Set xA = Range([A1], ActiveSheet.UsedRange)
'¡ô¥OxA³oÀx¦s®æÅܼƬO²[»\[A1]Àx¦s®æ»P¦¹ªí¤w¨Ï¥ÎÀx¦s®æ,
'²[»\³o°Ï¶¡ªº³Ì¤p¤è¥¿½d³òÀx¦s®æ

Set xB = [A:G]
'¡ô¥OxB³oÀx¦s®æÅܼƬO[A:G]Àx¦s®æ
Set xI = Intersect(xA, xB)
'¡ô¥OxI³oÀx¦s®æÅܼƬO xA»PxBÅܼƥ涰ªºÀx¦s®æ
xI.Offset(3, 0).ClearContents
'¡ô¥OxIÅܼƩ¹¤U°¾²¾3¦Cªº³o·s½d³òÀx¦s®æ²M°£¨ä¤º®e
End Sub
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

¦^´_ 15# Andy2483


    ·PÁÂANDY¤j¤j¡A½Ð°Ý¦³¿ìªk¥u§å¦¸§R°£©Ò¿ïªºÄæ¦ì¶Ü¡H

TOP

¦^´_ 16# sschristy


    ¥H¤U¬O§å¦¸§R°£¿ï¨úªº¦C¸ê®Æ(¿ï¨ú®æ¦CÄd>«ö¶s) ©Î ¥þ³¡¦C¸ê®Æ§R°£(¾ãªí¿ï¨ú>«ö¶s)

Private Sub CommandButton2_Click()
Dim Q, A$, i&, n&, xI As Range, Brr, xA As Range, xB As Range
Set xA = Selection.Cells: Set xB = ActiveSheet.UsedRange
If xA.EntireRow.Count > xB.Rows.Count Then Set xA = Intersect(xA, xB)
If xA Is Nothing Then Exit Sub
Set xI = Intersect(Range([A1], xB), [A:G]): Brr = xI
For Each Q In Split(xA.EntireRow.Address(0, 0), ",")
   For i = Split(Q, ":")(0) To Split(Q, ":")(1)
      A = IIf(A = "", "/" & Val(i) & "/", A & Val(i) & "/")
   Next
Next
For i = 4 To xI.Rows.Count
   If InStr(A, "/" & i & "/") Then GoTo i01 Else n = n + 1
   For j = 1 To UBound(Brr, 2): Brr(n, j) = Brr(i, j): Next
i01: Next
xI.Offset(3, 0).ClearContents
If n = 0 Then Exit Sub
[A4].Resize(n, UBound(Brr, 2)) = Brr
End Sub
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

¥»©«³Ì«á¥Ñ Andy2483 ©ó 2023-10-25 15:01 ½s¿è

¦^´_ 16# sschristy


    ¥H¤U¥t¤@¤èªk,½Ð«e½ú°Ñ¦Ò
Private Sub CommandButton2_Click()
Dim xU As Range, xA As Range, xB As Range
Set xA = Selection.Cells: Set xB = ActiveSheet.UsedRange.Offset(3)
Set xU = Union(xA, xB)
If xU.Count <> xB.Count Then Exit Sub
Intersect(xA.EntireRow, [A:G]).Delete Shift:=xlUp
End Sub
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

§Ú¬O¿n¤À¤£¨¬µLªkµo¤å
§V¤O¤¤

TOP

¦^´_ 10# Andy2483

ANDY¤j¤j¡A½Ð°Ý¦¹µ{¦¡½X¯à¤£¯à¼W¥[¤@¶µ¥\¯à¡H
´N¬O°²³]§Ú¿ï¤F¥|¦æ¦ý¥[¤J¨ì¥D­¶®É·|¦³¤­¦æ¡A¦Ó²Ä¤­¦æ¬°ªÅ¥Õ¦C¡C
³o¼Ëªº¥Î·N¦b¤ñ¸û¦n¤À¿ë¨C¤@¦¸¥[¤Jªº¤º®e¡C
ÁÂÁÂ

TOP

        ÀR«ä¦Û¦b : °µ¸Ó°µªº¨Æ¬O´¼¼z¡A°µ¤£¸Ó°µªº¨Æ¬O·Mè¡C
ªð¦^¦Cªí ¤W¤@¥DÃD