+ Reply to Thread
Results 1 to 5 of 5

VBA to paste 2 sets of formatted data into one sheet

  1. #1
    Forum Contributor
    Join Date
    05-01-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    822

    VBA to paste 2 sets of formatted data into one sheet

    Morning,

    I have the following code that takes 2 sets of data, formats the data and paste this into one tab of data called 'GI Data'

    My issue is when i have written the code, the final part of the code overwrites the 1st part of the code when copying the data into the 'GI Data' tab

    I assume i need to use the lastrow or lrow funtion but i'm not sure where to add this to my code

    Any help would be appreciated;

    Full code;
    Please Login or Register  to view this content.
    Last edited by kenadams378; 12-18-2012 at 07:34 AM.

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: VBA to paste 2 sets of formatted data into one sheet

    It is difficult to comment with out seeing the workbook, but try one of these lines.

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    05-01-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    822

    Re: VBA to paste 2 sets of formatted data into one sheet

    Where in my code shall i add one of those lines?

    I have attached a sample if it helps, the data in the attached is the raw data, if you run the code you will see only the C2 data is copied into the GI Data tab.
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    05-01-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    822

    Re: VBA to paste 2 sets of formatted data into one sheet

    Tried both suggested lines and it just pastes certain cells of data next to each other.

    I need them to sit on top of each other

  5. #5
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: VBA to paste 2 sets of formatted data into one sheet

    Try the attached.
    I have not looked at the codes lines after the value of Y is copied in to the main sheet
    Attached Files Attached Files

+ 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