Need macro for copying values from single column and pasting in multiple columns

moramramesh

New Member
Joined
May 22, 2019
Messages
17
Hi All,

I need macro for the below task.
I need to copy each set of data under each header from column B to column D, column E, and so on.

Column AColumn B
Server1
Header1Header2
Date1Value1
Date2Value2
Date3Value3
Date4Value4
Server2
Header1Header2
Date1Value1
Date2Value2
Date3Value3
Date4Value4
Server3
Header1Header2
Server4
Header1Header2
Date1Value1
Date2Value2
Date3Value3
Date4Value4

<colgroup><col span="2"></colgroup><tbody>
</tbody>

Target state (I want the above values from col B to be pasted to col D, col E etc in horizontal direction to plot the graph):
Column DColumn EColumn FColumn G
Header2Header2Header2Header2
Value1Value1Value1
Value2Value2Value2
Value3Value3Value3
Value4Value4Value4

<colgroup><col><col span="2"><col></colgroup><tbody>
</tbody>



Note: There are empty rows between server names and headers. Also there are empty rows between values and server names
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

Forum statistics

Threads
1,215,036
Messages
6,122,796
Members
449,095
Latest member
m_smith_solihull

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