+ Reply to Thread
Results 1 to 7 of 7

Select sheets in workbook then consolidate data

  1. #1
    Registered User
    Join Date
    12-22-2013
    Location
    Delhi, India
    MS-Off Ver
    Excel 2010
    Posts
    47

    Select sheets in workbook then consolidate data

    Hi friends,

    * I have a workbook, with different sheets (with sheet name as Home, RawData, Data1, Data2, Data3, ...), these sheets are not fixed
    * FYI... sheet (home) has a VBA code which on running creates a new sheet and pull data from some other source (So the sheet number is not fixed in the workbook, but the newly added sheet is named in a specific format as Data1, Data2, Data3, ...)
    * So we can say, that the sheet number and name are not fixed (It keeps on changing)
    * All these sheets have data in the same format starting from range A2:J2, except sheet(home)

    Two things i am trying to do:-
    - Select sheets from the workbook (to be consolidated)
    - Consolidate selected sheets in a new sheet

    Here is the sample file Select sheet then consolidate.xlsm


    Thanks & regards,
    Manish

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Select sheets in workbook then consolidate data

    So you want to consolidate the data in the sheets with names that begin with 'Data'?

    How and where do you want to consolidate them?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    12-22-2013
    Location
    Delhi, India
    MS-Off Ver
    Excel 2010
    Posts
    47

    Re: Select sheets in workbook then consolidate data

    Yes Norie, I want to consolidate data from sheet name starting with Data, but not from all the sheets which starts with Data.
    I want to first choose the sheets then consolidate the data by adding a new sheet in the same workbook.

    Like may be the first user will select only sheets (Data1, Data3 & Data4) and then he will consolidate the data
    then second user may select Sheets (Data3, Data4 & Data5) and then he will consolidate the data

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Select sheets in workbook then consolidate data

    How will the data be consolidated?

  5. #5
    Registered User
    Join Date
    12-22-2013
    Location
    Delhi, India
    MS-Off Ver
    Excel 2010
    Posts
    47

    Re: Select sheets in workbook then consolidate data

    Sorry I forgot about that,

    First row of consolidate sheet will contain the header and the following rows will contain the data from the first sheet, then immediately the next row will contain the data from the next selected sheet without the header and so on.

    Hope I am able to explain it correctly

  6. #6
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Select sheets in workbook then consolidate data

    This will consolidate all the currently selected sheets whose name begins with 'Data'.

    It will take the header row from the first of those sheets.
    Please Login or Register  to view this content.
    Note I've not checked the results as that's kind of hard to do when there's no static data.

  7. #7
    Registered User
    Join Date
    12-22-2013
    Location
    Delhi, India
    MS-Off Ver
    Excel 2010
    Posts
    47

    Re: Select sheets in workbook then consolidate data

    Wow... Lovely... it is exactly how i wanted it to be

    If you dont mind can i ask you one more help. Is there a way to select the sheets by using userform may be a listbox. If yes then can you please help me with that?

    Also can you please tell me about some of the variables you have used in the code
    Dim arrMaster()
    Dim arr()
    Dim idx As Long
    Dim I As Long

    Norie Once again thanks a lot for your help
    Quote Originally Posted by Norie View Post
    This will consolidate all the currently selected sheets whose name begins with 'Data'.

    It will take the header row from the first of those sheets.
    Please Login or Register  to view this content.
    Note I've not checked the results as that's kind of hard to do when there's no static data.

+ 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] Consolidate data from two sheets of same workbook
    By indianhp in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-19-2013, 01:53 AM
  2. Replies: 20
    Last Post: 10-19-2012, 04:35 PM
  3. [SOLVED] Need macro to consolidate data from select multiple sheets
    By titusingh in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-16-2012, 08:29 AM
  4. Help! Macro to consolidate data from multiple workbook sheets!
    By Sainath Krishnan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-08-2012, 08:18 AM
  5. Replies: 1
    Last Post: 04-11-2012, 03:10 AM

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