- ©«¤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
|
¦^´_ 3# luke
Sheet1 ªºµ{¦¡½X- Option Explicit
- Private Sub Worksheet_Change(ByVal Target As Range)
- Dim M As Variant
- Application.EnableEvents = False
- Select Case Target.Column
- Case 1 To 3 'A-CÄæÀx¦s®æ¦³¸ê®ÆÅÜ°Ê
- M = Application.Match(Cells(Target.Row, 1), Sheets("sheet2").Columns(1), 0)
- '¦b"sheet2"!AÄæ ¤¤´M§äsheet1!AÄæ¸ê®Æ
- If IsError(M) Then '§ä¤£¨ì®É Match¨ç¼Æ¶Ç¦^#N/A ¿ù»~È
- Cells(Target.Row, 2).Resize(, 2) = ""
- Else '§ä¨ì®É Match¨ç¼Æ¶Ç¦^Àx¦s®æªº¦C¸¹
- Cells(Target.Row, 2).Resize(, 2) = Sheets("sheet2").Cells(M, 2).Resize(, 2).Value
- End If
- Case 4 To 7 'D-GÄæÀx¦s®æ¦³¸ê®ÆÅÜ°Ê
- M = Application.Match(Cells(Target.Row, 4), Sheets("sheet3").Columns(1), 0)
- '¦b"sheet3"!AÄæ ¤¤´M§äsheet1!DÄæ¸ê®Æ
- If IsError(M) Then
- Cells(Target.Row, 5).Resize(, 3) = ""
- Else
- Cells(Target.Row, 5).Resize(, 3) = Sheets("sheet3").Cells(M, 2).Resize(, 3).Value
- End If
- End Select
- Application.EnableEvents = True
- End Sub
½Æ»s¥N½X |
|