+ Reply to Thread
Results 1 to 4 of 4

Copy specific cell from multiple sheets to summary - excluding some sheets

  1. #1
    Registered User
    Join Date
    02-12-2012
    Location
    Victoria
    MS-Off Ver
    Excel 2010, Excel 2013/64
    Posts
    23

    Copy specific cell from multiple sheets to summary - excluding some sheets

    Hi all,

    I've found so many macros that do this in various ways, that I feel embarrassed asking this. I'm quite new to VBA programming (programming in general), but I think I've got a bit of a handle on it.

    My problem.

    I have workbooks with 3 constant worksheet names and between 5-20 other worksheets of random alpha-numerical names (I'll refer to these as the non-constant worksheets). The data on all the non-constant worksheets is formatted in the same way.

    I want to copy the value of the same cell (C6) on all non-constant worksheets, along with the sheet name, to a new summary sheet (starting in row2).

    The worksheets I *do not* want to copy data from are named "all", "Generation_Summary" and "Inverse_Generation_Summary".

    My summary sheet is called "General_Summary" and I make it using:
    Please Login or Register  to view this content.
    I want to iteratively go through the rest of the workbook, and as it iterates:
    copy the name of each sheet to "General_Summary" Column A, and
    copy the value (its calculated from a formula) out of Range C6 on the same sheet to "General_Summary" Column B, resulting in something like:

    Please Login or Register  to view this content.
    In the iterative loop I want to *skip over* the worksheets named "all", "Generation_Summary" and "Inverse_Generation_Summary".

    thanks kindly for any help.
    best regards.
    Last edited by kabammi; 03-01-2012 at 09:18 AM.

  2. #2
    Registered User
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,160

    Re: Copy specific cell from multiple sheets to summary - excluding some sheets

    All you need is this code -
    Please Login or Register  to view this content.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    02-12-2012
    Location
    Victoria
    MS-Off Ver
    Excel 2010, Excel 2013/64
    Posts
    23

    Thumbs up Re: Copy specific cell from multiple sheets to summary - excluding some sheets

    Quote Originally Posted by arlu1201 View Post
    All you need is this code
    Thankyou so kindly Arlette! This works nicely.. it needed a couple of minor tweaks to get the worksheet names right, but that was very minor.

    I added in a few extra cells, and its all working very nicely.

    Here's the finished code:
    Please Login or Register  to view this content.
    I started the destination pasting on Row 2 (a = 2), and made a few row titles on the destination sheet too (in text format).

    thanks again!

  4. #4
    Registered User
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,160

    Re: Copy specific cell from multiple sheets to summary - excluding some sheets

    You can clean up this code too from
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.

+ 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