NEED HELP!!! copy paste automation macro

kajeet

New Member
Joined
Jun 10, 2013
Messages
2
Hello Everyone,

I need some help with VBA scripting. I am trying to automate the following task

The excel spreadsheet I have has data in cells A2, B2, C2, and D2. There are many rows one below the other.
The data is as below:
A2 = Orange
B2 = New York
C2= Ferrari
D2= Summer

I need to copy the contents of A2, B2, D2 and D2 in an orderly manner on the second work sheet of the same work book as below:

On Second work sheet, Data should be only in column A and B as following with fixed titles

Fruit = Orange
City = New York
Car = Ferrari
Season = Summer

I want to keep doing this for all the rows which have data in them. Fruit, City , Car and Season will be the constant titles.

I recorded a macro, but it does the copy paste thing only for the first row.

Would appreciate if you can help me with a script that continues the process as long as there is data in the sheet1

Many Thanks!
Ajit

PS: i have provided dummy data.
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Can you show the macro you recorded? It could help explain how you want the data copied\pasted.
 
Upvote 0

Forum statistics

Threads
1,216,545
Messages
6,131,282
Members
449,641
Latest member
paulabrink78

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top