I have a search routine that once it finds something, it copies the cell and pastes the contents into a third worksheet in column 1.
I now need to have it also copy the contents of a cell four columns to the left or three columns to the right (depending on the worksheet - logic already works for this) and paste the contents of both into the third worksheet in columns 1 and 2.
I cannot set the second cell to active in order to copy it.
Here is my current code:
' copy cell
Cells(iRow, iCol).Copy
' paste into column1 of Results
shkpt.Cells(kRow, 1).PasteSpecial _
xlPasteValues, , False, False
What I need is:
' copy cell
Cells(iRow, iCol).Copy
' copy cell three columns to right
???
' paste first cell into column1 of Results
shkpt.Cells(kRow, 1).PasteSpecial _
xlPasteValues, , False, False
' paste second cell into column2 (kRow, 2) of Results
???
and
' copy cell
Cells(iRow, iCol).Copy
' copy cell four columns to left
???
' paste first cell into column1 of Results
shkpt.Cells(kRow, 1).PasteSpecial _
xlPasteValues, , False, False
' paste second cell into column2 (kRow, 2) of Results
???
Thanks in advance.
Bookmarks