- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
        
|
¦^´_ 1# joshzhong
¸Õ¸Õ¬Ý
¤u§@ªí¤Wªº¹w³]¨Æ¥ó(Àx¦s®æ¦³§ïÅÜ©ÒIJ°Ê¨Æ¥ó)- Option Explicit
- Private Sub Worksheet_Change(ByVal Target As Range)
- Dim Rng As Range
- Set Rng = Range("C45:H50") '«ü©w´¡¤J·sªº¤@¦Cªº½d³ò
-
- If Target.Columns.Count = Rng.Columns.Count Then
- 'Columns.Count:¶Ç¦^½d³ò¤ºÄæ¦ìªºÁ`¼Æ
- 'Rows.Count:¶Ç¦^½d³ò¤º¦C¦ìªºÁ`¼Æ
- If Not Intersect(Rng, Target) Is Nothing And Target.Rows.Count = 1 Then
- 'Intersect ¤èªk ¶Ç¦^ ***[Range ª«¥ó]***¡A¦¹ª«¥ó¥Nªí¨âөΦhÓ½d³ò«Å|ªº¯x§Î½d³ò¡C
- ' Target.Rows.Count = 1 '¤@¦Cªº½d³ò
- If Target.Cells(1).Column = Rng.Cells(1).Column And Target.Cells(Target.Cells.Count).Column = Rng.Cells(Rng.Cells.Count).Column Then
- 'Target.Cells(1).Column = Rng.Cells(1).Column
- '´¡¤J·sªº¤@¦Cªº²Ä¤@ÓÄæ¸¹=«ü©w´¡¤J·sªº¤@¦Cªº½d³òªº²Ä¤@ÓÄæ¸¹
- 'Target.Cells(Target.Cells.Count).Column = Rng.Cells(Rng.Cells.Count).Column
- '´¡¤J·sªº¤@¦Cªº³Ì«á¤@ÓÄæ¸¹ = «ü©w´¡¤J·sªº¤@¦Cªº½d³òªº³Ì«á¤@ÓÄæ¸¹
- MsgBox Target.Address
- End If
- End If
- End If
- End Sub
½Æ»s¥N½X |
|