MrExcel Publishing
Your One Stop for Excel Tips & Solutions

macro help needed for worksheet to worksheet copy/paste

Posted by Daniel P. on September 06, 2000 8:58 AM

I have a spreadsheet with two worksheets, "Data Entry" and "Cumulative Report". After all data is entered into "Data Entry" and a report generated, I want to dump (copy/paste) this information into "Cumulative Report" for later use.

My problem is in absolute/relative references when I copy. I have formatted 200 rows in "Data Entry" but only around 100-150 rows are actually used. When writing the macro I would like to select row 2 and hold shift-end-down_arrow to select and copy without recording the cell addresses.

(note: I know I could copy all 200 and paste, then delete 100 lines from the end of "Cumulative Report" but I would rather not)

Any other suggestions?

Daniel P.

Posted by Ivan Moala on September 06, 0100 9:26 PM

If I understand you correctly
The VBA command you want is

Range(Rows("2"), Rows("2").End(xlDown)).Select

To select the entire ROW DOWN

To select the column from say a2 down is;

Range(Cells(2, 1), Cells(2, 1).End(xlDown)).Select