+ Reply to Thread
Results 1 to 7 of 7

VBA Loop - Copy and Paste Individual Cells

  1. #1
    Registered User
    Join Date
    03-22-2019
    Location
    Ohio
    MS-Off Ver
    ?
    Posts
    3

    VBA Loop - Copy and Paste Individual Cells

    Hello,

    I have a giant file that I am trying to use VBA to quickly work through.

    In column D, there are ~4500 unique identifiers. Somehow, i need to copy and paste those 4500 identifiers in the cell B1, individually.

    (Essentially I am trying to find a way to copy cell "D5" paste it in cell "B1" then to "D6" and paste back into "B1" and so on...)

    Any idea how to code this on VBA?

  2. #2
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: VBA Loop - Copy and Paste Individual Cells

    Hello
    Not so clear. Can you upload sample workbook to clarify what are you seeking to do?
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  3. #3
    Registered User
    Join Date
    03-22-2019
    Location
    Ohio
    MS-Off Ver
    ?
    Posts
    3

    Re: VBA Loop - Copy and Paste Individual Cells

    Hi Yasser,



    Essentially this is the file:

    A B C D
    1 ID Code:

    2 ABC123

    3 DEF234


    I am not sure if this makes sense, but i am trying to move "ABC123" (D2) to cell B1. Then put "DEF234" (D3) in cell B1, essentially overriding what i just pasted in B1.

    Does that make sense?

  4. #4
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,743

    Re: VBA Loop - Copy and Paste Individual Cells

    So what for pasting any value into B1 (from D2), when later on you want to overwrite B1 value it with value from D3?
    Do you want to do something meantime with B1 value? In other way step by step does not make sense.

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    and
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    finally gives the same result.

    Or I've missed something......
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  5. #5
    Registered User
    Join Date
    03-22-2019
    Location
    Ohio
    MS-Off Ver
    ?
    Posts
    3

    Re: VBA Loop - Copy and Paste Individual Cells

    is there a way to pause after pasting in cell B1?

  6. #6
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,743

    Re: VBA Loop - Copy and Paste Individual Cells

    As I was asking in prev. post:
    Do you want to do something meantime with B1 value?
    What for You need a pause?

  7. #7
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,097

    Re: VBA Loop - Copy and Paste Individual Cells

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not provided the required cross-post link(s) here.
    Read this to understand why we (and other sites like us) consider this to be important.

    As you are new I have added the link for you, but in future you need to do it yourself.
    https://www.mrexcel.com/forum/excel-...-vba-loop.html

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Copy selected worksheets and paste into individual workbooks
    By Groovicles in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-31-2017, 12:13 PM
  2. Replies: 3
    Last Post: 09-29-2014, 09:55 PM
  3. [SOLVED] Copy/Paste Loop Needs to Recognize Blank Cells
    By freybe06 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-07-2013, 11:50 AM
  4. [SOLVED] Copy dynamically changing column and Paste using VBA Loop (Loop within Loop)
    By nixon72 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-12-2013, 12:46 PM
  5. Replies: 2
    Last Post: 10-20-2008, 12:53 AM
  6. [SOLVED] Excel graphs should allow copy &amp;amp; paste of individual bar formats
    By belohls in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 07-01-2006, 05:40 AM
  7. Replies: 2
    Last Post: 02-28-2006, 11:25 PM

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