Copy past using VBA

Closed
ntmn8r Posts 3 Registration date Sunday November 13, 2016 Status Member Last seen November 17, 2016 - Nov 13, 2016 at 07:47 PM
cody-peter Posts 2 Registration date Tuesday November 29, 2016 Status Member Last seen November 30, 2016 - Nov 29, 2016 at 11:23 AM
I am in Excel trying to copy data from from one worksheet to another. The idea is new data would be added to the next row each time data is added. Each row consists of 17 columns. This data need to be copied to another page to a specific row and column.
What Im trying to do is use the input data to create data for a unique label.
Data B5 copy print A3
Data F5 copy print B3
Data F6 copy print C3
Data C7 copy print D3
Data F7 copy print E3
Data C8 copy print G3
Data C9 copy print H3
Data C10 copy print I3
Data C11 copy print J3
Data D12 copy print K3
Data D13 copy print L3
Data D14 copy print M3
Data D15 copy print N3
Data D16 copy print O3
Data D17 copy print P3
Data D18 copy print Q3
Data D19 copy print R3

I have tried to so a record macro all i get is a error

Please help
Bryan

3 responses

yg_be Posts 23412 Registration date Sunday June 8, 2008 Status Contributor Last seen December 28, 2024 5
Nov 15, 2016 at 04:48 PM
What error do you get when recording the macro?
0
ntmn8r Posts 3 Registration date Sunday November 13, 2016 Status Member Last seen November 17, 2016
Nov 15, 2016 at 05:11 PM
I got the record macro to function pas the error.
Now what I need is a way to prompt a user to input the row needed to print.
The some how in the code be able to take the input to assign a specific row
You help is greatly appreciated,
0
yg_be Posts 23412 Registration date Sunday June 8, 2008 Status Contributor Last seen December 28, 2024 5
Nov 15, 2016 at 05:31 PM
Instead of prompting the user, the macro could perhaps print the currently selected row?
0
ntmn8r Posts 3 Registration date Sunday November 13, 2016 Status Member Last seen November 17, 2016
Nov 17, 2016 at 02:33 PM
YG_BE, Yes that would work. How do I get that to function?
0
yg_be Posts 23412 Registration date Sunday June 8, 2008 Status Contributor Last seen December 28, 2024 5
Nov 17, 2016 at 02:42 PM
If you want to learn how to do that :
1) start recording a macro
2) select a range you want to print
3) print the selection
4) stop recording the macro
5) examine the macro, and use it as an example to code what you want to achieve
0
cody-peter Posts 2 Registration date Tuesday November 29, 2016 Status Member Last seen November 30, 2016
Nov 29, 2016 at 11:23 AM
There are a few different ways to accomplish this task, and the macro recorder doesn’t always give you the most efficient VBA code.

In the following three videos I explain:

The most efficient method for a simple copy and paste in VBA.
The easiest way to paste values.
How to use the PasteSpecial method for other paste types.
0