+ Reply to Thread
Results 1 to 5 of 5

Need macro for all open workbooks 1st columnc copy

  1. #1
    Registered User
    Join Date
    05-12-2010
    Location
    Adrian, MI
    MS-Off Ver
    Excel 2010
    Posts
    76

    Need macro for all open workbooks 1st columnc copy

    I am looking to get a macro that will copy "Column A" in Tab "Budget" for all open workbooks and place in a newly created workbook in a big line in that "Column A"

    If you need more info please let me know. Thanks

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,454

    Re: Need macro for all open workbooks 1st columnc copy

    Hi,

    This code (untested) should do as you need...

    Please Login or Register  to view this content.
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Registered User
    Join Date
    05-12-2010
    Location
    Adrian, MI
    MS-Off Ver
    Excel 2010
    Posts
    76

    Re: Need macro for all open workbooks 1st columnc copy

    I was giving me a syntax error

    Sub LoopThroughSheets()
    Dim wbBook As Workbook, rCopy As Range, rPaste As Range

    With Worksheets("Budget")
    For Each wbBook In Workbooks
    If wbBook.Name <> ThisWorkbook.Name Then
    Set rPaste = .Range&(A65536").End(xlUp).Offset(1, 0)
    Set rCopy = wbBook.Range(Range("A1"), Range("A1").End(xlDown))
    rCopy.Copy Destination:=rPaste
    End If
    Next
    End With


    If i can get it to open a new workbook and paste it into sheet 1 that would be great...

  4. #4
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,454

    Re: Need macro for all open workbooks 1st columnc copy

    If you're posting code, please wrap it in code tags as described here.

    Typo, sorry

    Please replace with this

    Please Login or Register  to view this content.
    Paste this code into an empty workbook and run it.

  5. #5
    Registered User
    Join Date
    05-12-2010
    Location
    Adrian, MI
    MS-Off Ver
    Excel 2010
    Posts
    76

    Re: Need macro for all open workbooks 1st columnc copy

    Sorry
    Please Login or Register  to view this content.
    Last edited by shg; 08-25-2010 at 01:26 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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