Need to copy a whole sheet into another

Closed
logsmein Posts 1 Registration date Tuesday November 5, 2013 Status Member Last seen November 5, 2013 - Nov 5, 2013 at 04:57 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Nov 5, 2013 at 11:27 AM
Working with 2 sheets, one as the invoice and the second as the master record. Everything entered into the invoice will be automatically copied into the second sheet/ master record. When the invoice is cleared though, the data in the master record still remains.

Kindly help me understand how this can be best done.

1 response

TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 552
Nov 5, 2013 at 11:27 AM
Hi Logsmein,

A macro code would be the best solution for you.

Which cells from the invoice sheet needs to go to which column on the master sheet.

Example:
Invoice sheet --> Master sheet
cell B10 --> Column A
cell E15 --> Column B
etc..

Code example would then be:
Sub RunMe()
Sheets("Master").Range("A" & Rows.Count).End(xlUp).Offset(1, 0) = Sheets("Invoice").Range("B10")
Sheets("Master").Range("B" & Rows.Count).End(xlUp).Offset(1, 0) = Sheets("Invoice").Range("E15")
End Sub

Do post back if you get stuck.

Best regards,
Trowa
0