- ©«¤l
- 522
- ¥DÃD
- 36
- ºëµØ
- 1
- ¿n¤À
- 603
- ÂI¦W
- 0
- §@·~¨t²Î
- win xp sp3
- ³nÅ骩¥»
- Office 2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-12-13
- ³Ì«áµn¿ý
- 2021-7-11
|
¦^´_ 1# ClareWu
¸Õ¸Õ¬Ý:
- Option Explicit
- '½Æ»s³Q¤Ä¿ïªº Ó¤H¨¾Å@¨ã
- Private Sub CommandButton1_Click()
- Dim Rng, rngB As Range, endRow, Row1 As Integer
-
- '±q [A65536] ¥Ñ¤U©¹¤W§ä, ª½¨ì§ä¨ì «DªÅ¥Õ®æ ¬°¤îªº Row(¦C¼ÆÈ)
- endRow = [A65536].End(xlUp).Row
-
- '²M°£ÄæC
- [C2:C65536] = ""
-
- '³]©w rngB ªº½d³ò
- Set rngB = [B2].Resize(endRow, 1)
-
- '¹ï©ó rngB ªº¨C¤@Ó¦¨û Rng ¨Ó»¡,
- For Each Rng In rngB
-
- '¦pªG Rng ªº¥k¤@®æ¬O "v"
- If Rng = "v" Then
-
- '«DªÅ¥Õ®æ ªº ¤U¤@®æ = ªÅ¥Õ®æ
- Row1 = [C65536].End(xlUp).Row + 1
-
- 'ÄæCªÅ¥Õ®æ ªºÈ = Rng ªº¥ª¤@®æ ªºÈ
- Cells(Row1, 3) = Rng.Offset(0, -1)
- End If
- Next
- End Sub
- '§Q¥Î ÄæB ¤Ä¿ïn½Æ»sªº¶µ¥Ø
- Private Sub Worksheet_SelectionChange(ByVal Target As Range)
- Dim Rng, rngB As Range, endRow As Integer
-
- endRow = [A65536].End(xlUp).Row
- Set rngB = [B1].Resize(endRow, 1)
-
- 'Intersect(Target, rngB) ¥i±N SelectionChange
- '©ÒIJ°Êªº¦³®Ä½d³ò¨î¦b rngB ¤¤,
- 'rngB Is Nothing¡÷ªí¥Ü rngB ¥¼³QIJ°Ê
- 'Not Intersect(Target, rngB) Is Nothing
- '¡÷ ªí¥Ü rngB ³QIJ°Ê¤F(tt±o¥¿)
- If Not Intersect(Target, rngB) Is Nothing Then
- If Target = "v" Then
- Target = ""
- Else
- Target = "v"
- End If
- End If
- End Sub
½Æ»s¥N½X |
|