How to copy and paste in a loop in a set of 3 cells

cubs786

New Member
Joined
May 28, 2019
Messages
4
Hi,

I have an excel with lots of data but the data is in columns (each column has 10,000 or more data points), such as:

7.52
7.56
7.56
7.55
7.35

and I want copy the first three cells and transpose them on a different excel file, such as

7.52, 7.56, 7.56
7.56, 7.55, 7.35

But I want to do the whole column instead of manually copying and pasting three cells at a time.

I will be using a macro to do this job.

I know how to copy and paste the first three cells using macro but I want to continue all of the data to run in a loop to finish the job automatically or there is any other to do this?

thanks.
 
You could do a variety of things: (1) use the macro; (2) format the range to not display 0s; (3) add an IF as you suggested.

Code:
=IF(0=INDEX($A:$A,ROW(A1)*3-3+COLUMN(A1)),"",INDEX($A:$A,ROW(A1)*3-3+COLUMN(A1)))
 
Upvote 0

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
column A

7.52
7.56
7.56
7.55
7.35

I want to have it in the same excel file

B C D
7.52, 7.56, 7.56
7.56, 7.55, 7.35
Hopefully it clears it up


Sorry, but I understood that you wanted it in a different file because of your comment:

and I want copy the first three cells and transpose them on a different excel file, such as

The macro is so that another book is created and also for several columns, due to your comment:

but the data is in columns

Of course, the macro will not work.
 
Upvote 0

Forum statistics

Threads
1,215,274
Messages
6,123,993
Members
449,137
Latest member
abdahsankhan

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