- ©«¤l
- 835
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 915
- ÂI¦W
- 0
- §@·~¨t²Î
- Win 10,7
- ³nÅ骩¥»
- 2019,2013,2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-3
- ³Ì«áµn¿ý
- 2024-11-14
|
¦U¦ì¤j¤j
1.Sheet2ªí©MSheet3ªí¬°¸ê®Æ¦C¦U¦³¼Æ¤dµ§¸ê®Æ.
2.Sheet1ªíA:CÄ欰Sheet2¿é¥X°Ï,¦ÓD:GÄ欰Shee ...
luke µoªí©ó 2012-9-20 20:19 
Module1ThisWorkBook- Private Sub Workbook_Open()
- Dim rTar As Range
-
- Set v2 = CreateObject("Scripting.Dictionary")
- Set v3 = CreateObject("Scripting.Dictionary")
-
- With Sheets("sheet2")
- For Each rTar In .Range(.[A2], .[A2].End(xlDown))
- v2(rTar & "") = rTar.Row
- Next rTar
- End With
-
- With Sheets("sheet3")
- For Each rTar In .Range(.[A2], .[A2].End(xlDown))
- v3(rTar & "") = rTar.Row
- Next rTar
- End With
- End Sub
½Æ»s¥N½X Sheet1- Private Sub Worksheet_Change(ByVal Target As Range)
- Dim iI%
- Dim rTar As Range
-
- Set rTar = Target
- With rTar
- Select Case .Column
-
- Case 1 ' °Ï¤À
- With .Parent
- For iI = 2 To 3
- .Cells(rTar.Row, iI) = Sheets("sheet2").Cells(v2(rTar.Text), iI)
- Next iI
- End With
-
- Case 4 ' ²¼¸¹
- With .Parent
- For iI = 2 To 4
- .Cells(rTar.Row, iI + 3) = Sheets("sheet3").Cells(v3(rTar.Text), iI)
- Next iI
- End With
-
- End Select
- End With
- End Sub
½Æ»s¥N½X
TEST25-ans.zip (38.42 KB)
Àɮפ¤ Sheet1 ¥k¤U¸ê®Æ¬O«O¯d¨ÓÅçÃҥΪº. |
|