+ Reply to Thread
Results 1 to 9 of 9

Combining some sheets into another sheet

  1. #1
    Forum Contributor
    Join Date
    07-31-2008
    Location
    Berkshire, UK
    MS-Off Ver
    2003 & 2007
    Posts
    118

    Combining some sheets into another sheet

    Hi all.

    Really appreciate everyone's help on this.

    I have a number of sheets in my workbook which I want to combine to a single sheet.

    The Data I want to copy is from A2:M? on Sheets called F1, F2, F3, F4, and pasted into a 5th sheet called FCombined.

    All of the above sheets have exactly the same layout.

    I did a search on combining sheets but the results threw up solutions where the sheets were the only ones in the entire workbook, I have other sheets which do different things.

    The only issue is that the quantity of records could change.

    I would be enormously grateful if anyone could help me out on this.

    Thanks in advance.

    Simon
    Last edited by simjambra; 03-11-2010 at 08:16 AM.

  2. #2
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Combining some sheets into another sheet

    Try:

    Please Login or Register  to view this content.

    Dom
    Last edited by Domski; 03-11-2010 at 08:05 AM. Reason: Small correction to code
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Combining some sheets into another sheet

    Untested (ie coded on the fly) but perhaps:

    Please Login or Register  to view this content.

    the above assumes

    a) final sheet has header row

    b) final sheet should be purged with each collation

    c) values only copy


    EDIT: 12:14 - missing comma in the .Clear line at beginning of routine - did say it was untested
    Last edited by DonkeyOte; 03-11-2010 at 08:14 AM.

  4. #4
    Forum Contributor
    Join Date
    07-31-2008
    Location
    Berkshire, UK
    MS-Off Ver
    2003 & 2007
    Posts
    118

    Re: Combining some sheets into another sheet

    Dom,

    Thanks so much for the reply but I don't want to combine all sheets in the workbook, only the ones named F1, F2, F3 and F4.

    There are another 5 unrelated sheets, you see.

    Thanks very much

    Simon

  5. #5
    Forum Contributor
    Join Date
    07-31-2008
    Location
    Berkshire, UK
    MS-Off Ver
    2003 & 2007
    Posts
    118

    Re: Combining some sheets into another sheet

    Donkey, that works a treat.

    Thanks ever so much.

  6. #6
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Combining some sheets into another sheet

    I'm sure Donkey's works but if not...

    Please Login or Register  to view this content.

    Dom

  7. #7
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Combining some sheets into another sheet

    Quote Originally Posted by Simon
    Donkey...
    Note my edit - I'd omitted a comma in the Clear which will if left unchanged cause problems on re-run (will not purge correctly).

  8. #8
    Forum Contributor
    Join Date
    07-31-2008
    Location
    Berkshire, UK
    MS-Off Ver
    2003 & 2007
    Posts
    118

    Re: Combining some sheets into another sheet

    Thanks both

    Reps added to.

    You guys are great

  9. #9
    Forum Contributor
    Join Date
    07-31-2008
    Location
    Berkshire, UK
    MS-Off Ver
    2003 & 2007
    Posts
    118

    Re: Combining some sheets into another sheet

    Quote Originally Posted by DonkeyOte View Post
    Note my edit - I'd omitted a comma in the Clear which will if left unchanged cause problems on re-run (will not purge correctly).
    Noted and updated, cheers

+ 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