![]() |
Copy row from one sheet to another
I'm writing a macro that finds a text string in one spreadsheet
(wsExtFrom), then copies that entire row to another sheet (wsExtrTo) in the same workbook. It copies to row lExt2Row. I can't seem to get the syntax right. lCopyRow = rFndCell.Row Set rCopy = wsExtFrom.Cells(lCopyRow, lCopyRow) rCopy.Copy Destination:=wsExtrTo.Rows(lExtr2Row) lExtr2Row = lExtr2Row + 1 Can anyone help me fix this mess? Thanks again! |
Copy row from one sheet to another
lCopyRow = rFndCell.Row
Set rCopy = wsExtFrom.rows(lCopyRow) rCopy.Copy Destination:=wsExtrTo.Rows(lExtr2Row) lExtr2Row = lExtr2Row + 1 -- Regards, Tom Ogilvy "davegb" wrote: I'm writing a macro that finds a text string in one spreadsheet (wsExtFrom), then copies that entire row to another sheet (wsExtrTo) in the same workbook. It copies to row lExt2Row. I can't seem to get the syntax right. lCopyRow = rFndCell.Row Set rCopy = wsExtFrom.Cells(lCopyRow, lCopyRow) rCopy.Copy Destination:=wsExtrTo.Rows(lExtr2Row) lExtr2Row = lExtr2Row + 1 Can anyone help me fix this mess? Thanks again! |
Copy row from one sheet to another
Tom Ogilvy wrote: lCopyRow = rFndCell.Row Set rCopy = wsExtFrom.rows(lCopyRow) rCopy.Copy Destination:=wsExtrTo.Rows(lExtr2Row) lExtr2Row = lExtr2Row + 1 -- Regards, Tom Ogilvy Thanks, Tom! At least I was close this time... "davegb" wrote: I'm writing a macro that finds a text string in one spreadsheet (wsExtFrom), then copies that entire row to another sheet (wsExtrTo) in the same workbook. It copies to row lExt2Row. I can't seem to get the syntax right. lCopyRow = rFndCell.Row Set rCopy = wsExtFrom.Cells(lCopyRow, lCopyRow) rCopy.Copy Destination:=wsExtrTo.Rows(lExtr2Row) lExtr2Row = lExtr2Row + 1 Can anyone help me fix this mess? Thanks again! |
All times are GMT +1. The time now is 03:38 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com