- ©«¤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
|
¦^´_ 1# aok669 - Sub Ex()
- Dim d As Object, Rng As Range, R As Range, C As Range
- Set d = CreateObject("Scripting.Dictionary")
- With Sheets("in")
- Set Rng = .Range("B2", .Cells(1, Columns.Count).End(xlToLeft).Offset(1)).Resize(.Cells(Rows.Count, 1).End(xlUp).Row - 1, .Cells(1, Columns.Count).End(xlToLeft).Column - 1)
- For Each R In Rng.Rows
- For Each C In R.Cells
- d(.Cells(C.Row, 1) & .Cells(1, C.Column)) = C
- Next
- Next
- End With
- With Sheets("¥»")
- Set Rng = .Range("B2", .Cells(1, Columns.Count).End(xlToLeft).Offset(1)).Resize(.Cells(Rows.Count, 1).End(xlUp).Row - 1, .Cells(1, Columns.Count).End(xlToLeft).Column - 1)
- For Each R In Rng.Rows
- For Each C In R.Cells
- If d.EXISTS(.Cells(C.Row, 1) & .Cells(1, C.Column)) Then C = d(.Cells(C.Row, 1) & .Cells(1, C.Column))
-
- Next
- Next
- End With
- End Sub
½Æ»s¥N½X |
|