Dougie4540
New Member
- Joined
- Jan 18, 2013
- Messages
- 2
Dear forum users,
I have a large data set in excel; 184 rows per column and roughly 569 columns. I want to copy the cells from column C and paste these below the values in column B with no gap. I then wish to copy cells from column D and place them below the column C values in Column B. I am trying to create a macro that will allow me to do this for all the columns; however as I have no VBA or macro experience I have been using the record fuction to look at the code and write it that way. However this leads to lengthy coding as follows:
Range("C1:C184").Select
Selection.Cut
ActiveWindow.SmallScroll Down:=174
Range("B185").Select
ActiveSheet.Paste
I then repeat this coding for each column adding 184 to the cell to paste into. Is there a quicker way of doing this without having to write the same code for each column e.g. some way to loop the code? Any advice would be greatly appreciated.
Thanks in advance,
Dave
I have a large data set in excel; 184 rows per column and roughly 569 columns. I want to copy the cells from column C and paste these below the values in column B with no gap. I then wish to copy cells from column D and place them below the column C values in Column B. I am trying to create a macro that will allow me to do this for all the columns; however as I have no VBA or macro experience I have been using the record fuction to look at the code and write it that way. However this leads to lengthy coding as follows:
Range("C1:C184").Select
Selection.Cut
ActiveWindow.SmallScroll Down:=174
Range("B185").Select
ActiveSheet.Paste
I then repeat this coding for each column adding 184 to the cell to paste into. Is there a quicker way of doing this without having to write the same code for each column e.g. some way to loop the code? Any advice would be greatly appreciated.
Thanks in advance,
Dave