+ Reply to Thread
Results 1 to 2 of 2

VBA- Macro for copy and paste of dynamic info in certain sheets into summary sheet

  1. #1
    Registered User
    Join Date
    11-25-2014
    Location
    Eire
    MS-Off Ver
    7
    Posts
    1

    VBA- Macro for copy and paste of dynamic info in certain sheets into summary sheet

    Hey all,

    First question here and an issue that is melting my poor brain.

    I have a Workbook and it has 6 tabs. These tabs are different divisions of a company. Each tab contains different headings like 'Employee Number' or 'First name' or 'Second name'. The heading aren't all in the same columns across the different tabs. (info being pulled from 6 different payrolls). The information is also changing on a monthly basis due to terminations and hires etc. The info is dynamic.

    I want to consolidate these into one long list.

    For example:

    I want VBA to copy the info from column A in tab1 into Column A in tab7 (summary tab) and then copy the info from Column A in tab2 into the NEXT BLANK CELL in column A in tab7 and so on and so forth for the rest of the divisional tabs.

    Finally Id like to be left with one unbroken list of all the info I need. I hope to be able to run a macro each month for this to save all the time wasting copying and pasting.

    Would really appreciate some help. So far my efforts have ended in frustration.

    Here is what Ive been trying so far:

    Sub Test2()
    '
    ' Test2 Macro
    'Dim s1 As Excel.Worksheet
    Dim s2 As Excel.Worksheet
    Dim iLastCellS2 As Excel.Range
    Dim iLastRowS1 As Long

    Set s1 = Sheets("BaulderStone")
    Set s2 = Sheets("Flattened Contribution File ")

    'iLastRowS1 = s1.Cells(s1.Rows.Count, "A").End(xlUp).Row

    'Set iLastCellS2 = s2.Cells(s2.Rows.Count, "A").End(xlUp).Offset(1, 0)

    's1.Range("A1", s1.Cells(iLastRowS1, "A")).Copy iLastCellS2

    'Dim s3 As Excel.Worksheet
    Dim s2 As Excel.Worksheet
    Dim iLastCellS2 As Excel.Range
    Dim iLastRowS1 As Long
    Set s3 = Sheets("Retirement Living")
    Set s2 = Sheets("Flattened Contribution File ")

    ' iLastRowS3 = s3.Cells(s1.Rows.Count, "D").End(xlUp).Row

    ' Set iLastCellS2 = s2.Cells(s2.Rows.Count, "A").End(xlUp).Offset(1, 0)

    's3.Range("A1", s3.Cells(iLastRowS3, "A")).Copy iLastCellS2
    '
    End Sub
    Last edited by Theresa.L.Waysone; 11-25-2014 at 05:02 PM.

  2. #2
    Forum Expert Debraj Roy's Avatar
    Join Date
    09-27-2012
    Location
    New Delhi,India
    MS-Off Ver
    Excel 2013
    Posts
    1,469

    Re: VBA- Macro for copy and paste of dynamic info in certain sheets into summary sheet

    Hi Theresa.L.Waysone !

    Welcome to the forum..

    "Ron de Bruin" has done mastering to overcome this type of situation..

    try this add-in..
    http://www.rondebruin.nl/win/addins/rdbmerge.htm

    let us know, if you are facing any issue..
    Regards!
    =DEC2HEX(3563)

    If you like someone's answer, click the star to give them a reputation point for that answer...

+ 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. [SOLVED] Copy from different sheets and paste to summary sheet
    By ischopra in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-02-2013, 09:59 AM
  2. Dynamic array, info one sheet to another based on criteria then macro to print sheets
    By jmendenhall22 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-22-2013, 10:25 AM
  3. Macro to copy/paste info in different sheets and to delete last entry
    By barcas84 in forum Excel Programming / VBA / Macros
    Replies: 25
    Last Post: 02-02-2012, 02:30 PM
  4. Copy range A:7 - Z200 from all sheets and paste into summary sheet
    By cheesiepoof05 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-06-2011, 05:45 PM
  5. find value in multiple sheets, copy offset and paste to summary sheet
    By Pholic in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-02-2011, 12:23 PM

Tags for this Thread

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