+ Reply to Thread
Results 1 to 4 of 4

How To Copy & Paste Data From One Tab To A Certain Cell In Another

  1. #1
    Valued Forum Contributor
    Join Date
    09-09-2009
    Location
    Liverpool, England
    MS-Off Ver
    Excel 2021
    Posts
    1,019

    How To Copy & Paste Data From One Tab To A Certain Cell In Another

    Hi,

    I'm trying to copy and paste data from one tab to the first empty row below existing data on another tab. My problem occurs at the red text below. I don't want to paste the copied data into cell 'A3110' that just happened to be the next free cell below the existing data when I recorded the macro. How can I amend it to achieve what i'm after?

    Please Login or Register  to view this content.
    Thanks in advance,

    Snook
    Last edited by The_Snook; 12-31-2011 at 08:09 PM.

  2. #2
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: How To Copy & Paste Data From One Tab To A Certain Cell In Another

    hi The Snook, sort of that basing on your code
    Please Login or Register  to view this content.

  3. #3
    Valued Forum Contributor
    Join Date
    09-09-2009
    Location
    Liverpool, England
    MS-Off Ver
    Excel 2021
    Posts
    1,019

    Re: How To Copy & Paste Data From One Tab To A Certain Cell In Another

    It works a treat but i'd be grateful if you (or someone else) could explain to me why? I'm new to VBA but keen to enhance my understanding.

    Please Login or Register  to view this content.
    Thanks,

    Snook

  4. #4
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: How To Copy & Paste Data From One Tab To A Certain Cell In Another

    hi Snook, merry xmas and best wishes.

    The whole Range(...) defines range of cells.
    "a2" means the left upper range cell the range starts from
    Cells(2,1) equals to A2 or R2C1
    End(xlToRight) means go to the right from Cells(2,1) until the first empty cell met
    offset(1) means offset one row down. So range("a1").offset(1) gives you range("a2")

    Try to experiment with that on a sheet with data. Replace copy to select for study purpose to visualize what is going on. However avoid using Select in the code.

    Hope that helps

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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