I'm very new to VBA and am trying to understand loops with strings.
All I would like to do is copy each cell from column A individually and insert it into column B on a loop. So copy A2 (aaaa) and paste the value into cell B2 then move on to A3 to copy (bbbb) and paste value into B3 and so on. I'm working on a small project and am stuck on the loop so I figure starting with the basics will help me figure it out.
For my project, I'm pulling data from a single cell in one column like this and then inserting it into an external application where I run a process. Then, I have to grab the next cell and start the process over again. I'm just trying to learn how the theory works before I try to add it in and I can not find the answer I am looking for online.
The below simple code I wrote will copy column a and paste it in column b but will invert it. I'm not sure where to go from here. Spreadsheet is attached. Thank you!
Sub loop_practice()
'
' loop_practice Macro
'
Dim icell As Range
For Each icell In Range("a2:a7").Cells
icell.Copy
Range("b2").Insert
Next icell
End Sub
Bookmarks