Report

Copy past using VBA

Ask a question ntmn8r 3Posts Sunday November 13, 2016Registration date November 17, 2016 Last seen - Last answered on 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
See more 
Helpful
+0
moins plus
What error do you get when recording the macro?
ntmn8r 3Posts Sunday November 13, 2016Registration date November 17, 2016 Last seen - 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,
Reply
Add comment
Helpful
+0
moins plus
Instead of prompting the user, the macro could perhaps print the currently selected row?
ntmn8r 3Posts Sunday November 13, 2016Registration date November 17, 2016 Last seen - Nov 17, 2016 at 02:33 PM
YG_BE, Yes that would work. How do I get that to function?
Reply
yg_be 842Posts lundi 9 juin 2008Registration date December 8, 2016 Last seen - 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
Reply
Add comment
Helpful
+0
moins plus
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.
Add comment

Member requests are more likely to be responded to.

Members can monitor the statuses of their requests from their account pages.

A CCM membership gives you access to additional options.

Not a member yet?

Sign up now. It takes less than a minute and is completely free!