Need Help with a VBA subroutine

Dec 9, 2015
Reaction score
I'm working on an Excel spreadsheet and I need some help with a some VBA code. Here's what I want to do.

On Sheet1 in my spreadsheet I have 12 rows of data running from column A through column N.
On Sheet2 in my spreadsheet I have a formatted report laid out in 19 rows of data running from column A though column I.

What I want to do is be able to copy 2 adjacent cells on one row in Sheet1 to 2 specific adjacent cells in sheet2 but I want to be able to highlight (select) the row of data in sheet1 that I want to copy.

I was able to get this to work with the first row of data (Row 4) in Sheet1 with the following VBA subroutine.

Sub copydata()
End Sub

What I have not been able to figure out yet is how to make the code work when I select a different row of data. Can anyone explain to me how to do this so the date that's copied varies from row to row based on the row highlighted?


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question