+ Reply to Thread
Results 1 to 4 of 4

VBA copy rows in table containing values in list, paste in another worksheet

  1. #1
    Registered User
    Join Date
    07-20-2015
    Location
    New York, US
    MS-Off Ver
    2013
    Posts
    43

    VBA copy rows in table containing values in list, paste in another worksheet

    Hi gurus (seriously you guys are insane),

    Thanks in advance for any responses, they are always much appreciated!

    Here is the low down of the workbook I am dealing with (example also attached):
    • In sheet3 there is a list of dates starting at D1 going across row 1. The length of the list will vary each time the macro is run.
    • In sheet1 there is a table of payments with dates in column A. The example table is small but currently it actually goes down to around row 1000.
    • In sheet 2 I need to paste all payments from the table in sheet1 for the dates listed in sheet3. The payments need to be pasted transposed starting at AA1 in sheet2 (payments will list down, dates across).


    Is there VBA code which can loop through the list of dates in sheet3, copy the rows in sheet1 which contain those dates and paste them transposed in to sheet2 starting at cell AA1?

    Thank you and please let me know if I need to clarify anything!
    Attached Files Attached Files

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: VBA copy rows in table containing values in list, paste in another worksheet

    Hi Wannabe,

    Try this:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    07-20-2015
    Location
    New York, US
    MS-Off Ver
    2013
    Posts
    43

    Re: VBA copy rows in table containing values in list, paste in another worksheet

    Thanks xladept! Works perfectly with a straight copy paste - very nice
    Last edited by wannabeexcelguy; 07-20-2015 at 06:16 PM. Reason: My own limitations

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: VBA copy rows in table containing values in list, paste in another worksheet

    Hi Wannabe,

    You're welcome and thanks for the rep!

    BTW - Have you considered changing your handle to Gonnabe?

    Oh, I just noticed that you're brand new here - so, Welcome to the Forum!!

+ 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. Replies: 1
    Last Post: 12-18-2014, 04:15 PM
  2. Copy Formulas and Paste into the Last Set # of Rows Only & Paste Values
    By Mr. Ice in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-23-2014, 07:48 AM
  3. Replies: 1
    Last Post: 05-14-2014, 12:52 AM
  4. How-to Copy and Paste Values from list into Pivot Table filter
    By MacroNerd in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-05-2013, 06:26 PM
  5. Filter list of values twice and copy rows to new table
    By Beekster in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-01-2013, 07:36 AM
  6. Copy and paste certain rows of a table to create a new table
    By redhawk87 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-12-2013, 12:37 PM
  7. Copy/Paste Cells from old list to new master list by matching values
    By rfsmith in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-19-2012, 05:32 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