+ Reply to Thread
Results 1 to 2 of 2

VBA / Power Query to copy sheet 1 data to sheet 2 below the last used row

  1. #1
    Registered User
    Join Date
    10-15-2019
    Location
    London
    MS-Off Ver
    2016
    Posts
    62

    VBA / Power Query to copy sheet 1 data to sheet 2 below the last used row

    Hello all,

    I want to copy data from sheet 1 to sheet 2 below the last used cell/row.

    Attaching excel file for better understanding, I want the highlighted cells to go to sheet2 with M or VBA code. or if any other easy alternatives available.
    Attached Files Attached Files

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: VBA / Power Query to copy sheet 1 data to sheet 2 below the last used row

    Using VBA

    Please Login or Register  to view this content.


    Using Power Query (M)

    Format data in Sheet1 as a table (TableNew).
    Format Data in Sheet2 as a table (TableTemp)

    Create query:
    Please Login or Register  to view this content.
    Name the query TableCurrent, and Load To Table on Sheet2.

    Delete TableTemp, and amend query to:

    Please Login or Register  to view this content.

    Now whenever you refresh data, whatever is in the table on Sheet1 will be appended to the table on Sheet2.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

+ 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. Select sheet after Power Query Update
    By jonrack in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-05-2019, 02:16 PM
  2. Sub-Forum for Excel Power Tools (Power Query, Power Pivot & Power BI)
    By chullan88 in forum Suggestions for Improvement
    Replies: 10
    Last Post: 06-28-2018, 02:25 PM
  3. Replies: 1
    Last Post: 11-17-2017, 07:45 PM
  4. Replies: 2
    Last Post: 01-23-2016, 01:16 PM
  5. [SOLVED] Copy and paste data from sheet 2 to sheet 1 based on specific criteria on sheet 1
    By VBADUD in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-05-2012, 04:18 AM
  6. Replies: 3
    Last Post: 10-22-2012, 05:23 PM
  7. Query complete sheet and copy to another sheet
    By bhansen70 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-09-2007, 06:07 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