- ©«¤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
|
¦^´_ 5# y663258
'Module ªºµ{¦¡½X- Option Explicit
- Public A() 'Module ªºµ{¦¡½X
- Sub Ex() '´¡¤Jª«¥ó(¹Ï¤ù,¤å¦r®Øµ¥..«ö¶s) «ü©w¦¹¥¨¶°
- Dim Rng As Range, M As String, i
- Set Rng = Range("B39", Range("B39").End(xlDown))
- On Error GoTo Thend
- For i = 0 To UBound(A) - 1
- M = M & IIf(M <> "", " : ", "") & Rng(A(i))
- Next
- MsgBox M
- Erase A
- Thend:
- End Sub
½Æ»s¥N½X Worksheet ªºµ{¦¡½X- Option Explicit
- Private Sub Worksheet_SelectionChange(ByVal Target As Range)
- Dim AR(1 To 7) As Range, i As Integer, s As Integer
- Application.EnableEvents = False
- Set AR(1) = [A3:E12]
- Set AR(2) = [G3:K12]
- Set AR(3) = [M3:Q12]
- Set AR(4) = [A15:E24]
- Set AR(5) = [G15:K24]
- Set AR(6) = [M15:P24]
- Set AR(7) = [A27:D37]
- For i = 1 To 7
- If i = 1 Then s = 1 Else s = s * 2
- If Not Intersect(Target(1), AR(i)) Is Nothing Then
- On Error GoTo TEN:
- A(UBound(A)) = s
- ReDim Preserve A(UBound(A) + 1)
- End If
- Next
- Application.EnableEvents = True
- Exit Sub
- TEN:
- ReDim A(0)
- Resume
- End Sub
½Æ»s¥N½X |
|