本帖最后由 zjdh 于 2014-5-27 09:05 编辑
Sub test()
R = Sheets(1).Range("A65536").End(3).Row
With Sheets(1).Range("A2:I" & R)
Set W = .Find("出库单", LookAt:=xlWhole)
firstAddress = W.Address
F = 1
Do
F2 = W.Row - 1
Range(Cells(F, 1), Cells(F2, 9)).PrintOut
Set W = .FindNext(W)
F = F2 + 1
Loop While Not W Is Nothing And W.Address <> firstAddress
Range(Cells(F, 1), Cells(R, 9)).PrintOut
End With
End Sub