|
本帖最后由 hwc2ycy 于 2012-8-27 02:02 编辑
刚测试发现FIND参数用误。- Sub s1()
- Dim lastr&
- Dim c&
- Dim r&
- Dim i&
-
- Application.ScreenUpdating = False
-
- lastr = Range("a65535").End(xlUp).Row
- For i = 7 To lastr
- With Sheets("价格表")
- c = Application.WorksheetFunction.CountIf(.[a:a], Cells(i, 1).Value)
- If c > 0 Then
- r = .[a:a].Find(Cells(i, 1), , , xlWhole, , xlNext).Row
- Cells(i, 1).Resize(1, 9).Value = .Cells(r, 1).Resize(1, 9).Value
- End If
- End With
- Next
- End Sub
复制代码 |
|