- ©«¤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
|
¸Õ¸Õ¬Ý:- Private Sub CommandButton1_Click()
- Dim Sh1 As Worksheet, Sh2 As Worksheet
- Dim Rng1 As Range, Cel As Range, Fst As String
- Dim I As Integer, Cnt As Integer, R1 As Integer
- Set Sh1 = Sheets("Sheet1")
- Set Sh2 = Sheets("Sheet2")
- Sh1.[B1:P10] = ""
- R1 = Sh1.[A65536].End(xlUp).Row
- For I = 1 To R1
- Set Rng1 = Sh1.Cells(I, 1)
- Cnt = 0
- Set Cel = Sh2.[A:A].Find(Rng1, After:=Sh2.[A65536], Lookat:=xlWhole) 'AÄ椤´M§ä
- If Not Cel Is Nothing Then
- Fst = Cel.Address '«O¦s²Ä¤@Ó¦ì§}
- Do
- Cnt = Cnt + 1
- Rng1.Offset(, Cnt) = Cel.Offset(, 1)
- Set Cel = Sh2.[A:A].FindNext(Cel) '´M§ä¤U¤@Ó
- Loop Until Fst = Cel.Address '¦^¨ì²Ä¤@Ó¦ì§}
- End If
- Next
- End Sub
½Æ»s¥N½X
|
|