Results 1 to 4 of 4

Single Column - Individually Copying and Pasting Loop

Threaded View

kingbluey Single Column - Individually... 11-15-2024, 10:12 PM
jolivanes Re: Single Column -... 11-15-2024, 10:40 PM
kingbluey Re: Single Column -... 11-15-2024, 11:14 PM
jolivanes Re: Single Column -... 11-15-2024, 11:53 PM
  1. #1
    Registered User
    Join Date
    11-15-2024
    Location
    Illinois, USA
    MS-Off Ver
    Version 2410
    Posts
    2

    Lightbulb Single Column - Individually Copying and Pasting Loop

    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
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Copying and pasting For/Next Loop
    By dweingar in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-26-2019, 10:27 AM
  2. Help copying a column and pasting into a single cell
    By rosscortb in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-22-2019, 04:00 AM
  3. Loop for copying and pasting
    By johni123 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-14-2016, 08:29 PM
  4. Copying and pasting a table of data with individually color filled cells
    By Paragoomba in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 06-18-2013, 11:49 AM
  5. Replies: 1
    Last Post: 07-20-2012, 06:20 PM
  6. macro to sum each range individually within a single column
    By jferguson in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-16-2010, 12:56 PM
  7. COpying & pasting from multiple worksheets to a single worksheet
    By Antho in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-23-2009, 11:48 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1