+ Reply to Thread
Results 1 to 4 of 4

Consolidation of a range in different sheets to a single sheet

  1. #1
    Forum Contributor
    Join Date
    08-02-2015
    Location
    Hyderabad
    MS-Off Ver
    2007
    Posts
    160

    Consolidation of a range in different sheets to a single sheet

    Dear All,

    Hoping doing good!!!!

    My Requirement is to consolidate a range (a row starts with specifications of ***** to "Remarks:") from 150 sheets to a single sheet

    Here challenges are:

    1. I dont know where did this range located in all sheets. So I want VB to search for "Specifications of" word & "Remarks" word and want to retrieve the related data from the next columns

    2. Next columns might have hidden but still VB has to retrieve the data from the respective columns

    3. This range can be there multiple times in a sheet, I even want this range also.
    Last edited by laansesu; 04-26-2016 at 01:58 AM.

  2. #2
    Forum Contributor
    Join Date
    01-08-2016
    Location
    Cagayan De Oro City, Philippines
    MS-Off Ver
    2013
    Posts
    152

    Re: Consolidation of a range in different sheets to a single sheet

    Did you already make a start on this?

    what code do you have right now?

  3. #3
    Forum Contributor
    Join Date
    08-02-2015
    Location
    Hyderabad
    MS-Off Ver
    2007
    Posts
    160

    Re: Consolidation of a range in different sheets to a single sheet

    Sorry I dont have code, but after checking most of the websites, I came to know that we can consolidate the ranges in all sheets using PivotTable and PivotChart Wizard (as per this link https://www.youtube.com/watch?v=hTw-3PbYuKY). But here issue is I have to check all 150 sheets and select the range.

    Can you please help me out to consider only this range with this PT & PC wizard.

  4. #4
    Forum Contributor
    Join Date
    08-02-2015
    Location
    Hyderabad
    MS-Off Ver
    2007
    Posts
    160

    Re: Consolidation of a range in different sheets to a single sheet

    Dear GBeats,

    I dont know VB coding. But I've recorded a macro for which I request you to have VB Code for me. I've selected the range in first sheet manually in this recorded macro.

    Below VB Code is for first sheet, Now further VB Code must check range from "Specification Details of ****" to "Remarks" for the next sheets and has to add the same to the pivot table which I created in the macro. As I've 150 sheets to consolidate, So if number of rows exceeded in the first sheet, then it has to create and then do the same as per the below macro

    Sub Consolidation()
    '
    ' Consolidation Macro
    ' This is to consolidate a range with Pivot Wizard
    '

    '
    ActiveWorkbook.PivotCaches.Create(SourceType:=xlConsolidation, SourceData:= _
    Array(Array("'56"" VIVA MS MICRA,BAHRAIN'!R1C1:R25C2", "Item1"), Array( _
    "'56"" VIVA MS MICRA,BAHRAIN'!R28C1:R53C3", "Item2")), Version:= _
    xlPivotTableVersion12).CreatePivotTable TableDestination:="", TableName:= _
    "PivotTable3", DefaultVersion:=xlPivotTableVersion12
    ActiveSheet.PivotTableWizard TableDestination:=ActiveSheet.Cells(3, 1)
    ActiveSheet.Cells(3, 1).Select
    ActiveSheet.PivotTables("PivotTable3").DataPivotField.PivotItems( _
    "Count of Value").Position = 1
    Range("A5").Select
    With ActiveSheet.PivotTables("PivotTable3")
    .InGridDropZones = True
    .RowAxisLayout xlTabularRow
    End With
    ActiveSheet.PivotTables("PivotTable3").PivotFields("Column").Orientation = _
    xlHidden
    With ActiveSheet.PivotTables("PivotTable3").PivotFields("Count of Value")
    .Orientation = xlRowField
    .Position = 2
    End With
    Range("A6").Select
    ActiveSheet.PivotTables("PivotTable3").PivotFields("Row").Subtotals = Array( _
    False, False, False, False, False, False, False, False, False, False, False, False)
    End Sub
    Last edited by laansesu; 04-26-2016 at 06:16 AM.

+ 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. Replies: 0
    Last Post: 10-12-2015, 10:02 AM
  2. [SOLVED] Consolidation several tabs' data into a consolidation sheet via a loop?
    By Gti182 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-30-2015, 08:18 AM
  3. [SOLVED] Get a single sheet name from multiple sheets.
    By keyantkarthi in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-07-2012, 12:51 AM
  4. Transpose Macro for single line consolidation
    By cmross2010 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-24-2012, 02:50 PM
  5. Consolidation of workbooks in the same file to a single sheet in a master
    By Jaspabl in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-25-2011, 12:11 AM
  6. Consolidation of Workbooks into single workbook
    By Miraun in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-14-2009, 11:00 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