RoodyJ
05-22-2007, 01:15 PM
I have data on one worksheet that I want to selectively copy to another worksheet. The data is always ten rows but the beginning row and column will be different each time the selection is made.
Inpt = InputBox("Which PO#?")
'Find the first line with the PO number
Range("A3").Select
ActiveCell(3, 1).Select
Cells.Find(What:=Inpt, After:=ActiveCell, LookIn:=xlValues, LookAt:= _
xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
'and copy the PO number
Selection.Copy
'to a cell on the PO Form
Sheets("PO Form").Select
Range("F2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
The above does what I want for a single cell. However, what I would like to do is copy a ten row by one column block starting at the 'found cell'. I'm not at all sure how to specify that range based on the 'found cell' results above. Any help would surely be appreciated.:help
Jim
Inpt = InputBox("Which PO#?")
'Find the first line with the PO number
Range("A3").Select
ActiveCell(3, 1).Select
Cells.Find(What:=Inpt, After:=ActiveCell, LookIn:=xlValues, LookAt:= _
xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
'and copy the PO number
Selection.Copy
'to a cell on the PO Form
Sheets("PO Form").Select
Range("F2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
The above does what I want for a single cell. However, what I would like to do is copy a ten row by one column block starting at the 'found cell'. I'm not at all sure how to specify that range based on the 'found cell' results above. Any help would surely be appreciated.:help
Jim