PDA

View Full Version : Move to next column in a loop



Jane Thamban
09-21-2018, 12:05 PM
I am trying to copy and paste from the columns "B18:C3665" from the sheet DEMO and paste the columns in the sheet "Concentration Data" Columns C8.
the next set of data needs to be copied from the same columns Demo : B18-C3665 and needs to be pasted in "Concentration Data" Columns E8. this task to be repeated 30 times. I appreciate if anyone help me with this code.

Thank you !!


ActiveWindow.SmallScroll Down:=-11
Range("B18:C3665").Select
Range(Selection, Selection.End(xlDown)).Select
col = ActiveCell.Select("C8")

For L = 1 To 30

Worksheets("Demo").Range("B18").Copy
Worksheets("Concentration Data").Select
Range(col).PasteSpecial Paste:=xlPasteValues
col = ActiveCell.Offset(0, 2)


Next L

jolivanes
09-21-2018, 02:08 PM
https://www.excelforum.com/excel-programming-vba-macros/1246384-how-to-move-to-next-column-in-loop.html

I think you have your answer in that Post.

Please be so kind and in your next time asking for help, hyperlink to all sites where you have asked for the same help.
There is lots of information (Google) on cross posting

Good luck

Jane Thamban
09-21-2018, 02:54 PM
https://www.excelforum.com/excel-programming-vba-macros/1246384-how-to-move-to-next-column-in-loop.html

I think you have your answer in that Post.

Please be so kind and in your next time asking for help, hyperlink to all sites where you have asked for the same help.
There is lots of information (Google) on cross posting

Good luck

Sorry. I did not mean to trouble the same resources, multiple times and didn't realize that this could end up being cross-posting to the same resources. Next time I will hyperlink them.