Select any row, copy data from specific columns

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to create the following funtionality:

1. Copy data from specific cells in the highlighted row.
2. Paste the data into a different worksheet.

I think I understand how to paste the data into another worksheet, but how
do I get data from specific columns into the clipboard?

Example:

1. User selects row 3.
2. User clicks the "Create Report" button.
3. Excel copies data from 3C, 3D, and 3H.
4. Excel pastes the data into Worksheet "Report."
5. User selects row 8.
6. User clicks the same button.
7. Excel copies data from 8C, 8D, and 8H, overwriting the previous data.

Steps 3 and 7 are where I'm hung up. I'm very new to programing, so any help
is appreciated...
 
Try this TexWolf

Cells(ActiveCell.Row, 1).Range("C1,D1,H1").Copy Sheets("Report").Range("A1")
 

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

Back
Top