Macro for Copying & Pasting in Bulk & Filling Series

AFlyingHippo

New Member
Joined
Jul 15, 2013
Messages
1
Hi All,

I have a worksheet that has data in 52 rows (starting at row 2) and 4 columns (A, B, C, and D). Currently column A is unique to itself, and Columns B, C, D go together. Excluding headers, each column has the following number of cells with data:
Column A has 52 cells
Column B has 40 cells
Column C has 40 cells
Column D has 40 cells - 1 unique cell

I need a macro that will make 40 copies of all 52 cells in Column A, and pair them with the cells in column B, C, and D

Example:

Name
CountryCityConstant
AlexUnited KingdomLondonYes
BrianChinaBeijingYes
CalvinUnited StatesMiamiYes
DavidUnited StatesChicagoYes
JapanTokyoYes
United KingdomLeedsYes
GermanyBerlinYes

FranceParisYes

<colgroup><col style="width:48pt" span="4" width="64"> </colgroup><tbody>
</tbody>
Becomes:

NameCountryCityConstant
AlexUnited KingdomLondonYes
BrianChinaBeijingYes
CalvinUnited StatesMiamiYes
DavidUnited StatesChicagoYes
AlexJapanTokyoYes
BrianUnited KingdomLeedsYes
CalvinGermanyBerlinYes
DavidFranceParisYes
AlexUnited KingdomLondonYes
BrianChinaBeijingYes
CalvinUnited StatesMiamiYes
DavidUnited StatesChicagoYes
AlexJapanTokyoYes
BrianUnited KingdomLeedsYes
CalvinGermanyBerlinYes
DavidFranceParisYes
AlexUnited KingdomLondonYes
BrianChinaBeijingYes
CalvinUnited StatesMiamiYes
DavidUnited StatesChicagoYes
AlexJapanTokyoYes
BrianUnited KingdomLeedsYes
CalvinGermanyBerlinYes
DavidFranceParisYes
AlexUnited KingdomLondonYes
BrianChinaBeijingYes
CalvinUnited StatesMiamiYes
DavidUnited StatesChicagoYes
AlexJapanTokyoYes
BrianUnited KingdomLeedsYes
CalvinGermanyBerlinYes
DavidFranceParisYes
AlexUnited KingdomLondonYes
BrianChinaBeijingYes
CalvinUnited StatesMiamiYes
DavidUnited StatesChicagoYes
AlexJapanTokyoYes
BrianUnited KingdomLeedsYes
CalvinGermanyBerlinYes
DavidFranceParisYes

<colgroup><col><col><col span="2"></colgroup><tbody>
</tbody>
Thank you for your help.

<colgroup><col style="width:48pt" span="4" width="64"> </colgroup><tbody>
</tbody>
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

Forum statistics

Threads
1,215,594
Messages
6,125,723
Members
449,255
Latest member
whatdoido

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