+ Reply to Thread
Results 1 to 7 of 7

Macro to Create a Master Sheet and consolidate data as per Headings on all Sheets

  1. #1
    Forum Contributor
    Join Date
    06-03-2004
    Location
    India
    MS-Off Ver
    2013
    Posts
    205

    Macro to Create a Master Sheet and consolidate data as per Headings on all Sheets

    Thanks for your time and help
    Last edited by prkhan56; 09-21-2015 at 01:08 PM.

  2. #2
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: Macro to Create a Master Sheet and consolidate data as per Headings on all Sheets

    I think you missed a set of H10 data from either Sheet1 or Sheet3, but otherwise this code mirrors you results on Master.

    Please Login or Register  to view this content.
    I'm interested in starting a career working with VBA, if anyone knows of any opportunities!

  3. #3
    Forum Contributor
    Join Date
    06-03-2004
    Location
    India
    MS-Off Ver
    2013
    Posts
    205

    Re: Macro to Create a Master Sheet and consolidate data as per Headings on all Sheets

    Thanks for the prompt reply.
    But when I run the code it gives me
    Run time error 9 - Subscript out of range error
    and highlights

    Set M = Sheets("Master")
    Can you please check the code.

  4. #4
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: Macro to Create a Master Sheet and consolidate data as per Headings on all Sheets

    Do you have a sheet named "Master" in the workbook you're running the code in? If not, change "Master" to match the name of the sheet you're trying to compile the data in.

    Edit: just saw that you asked that the macro create the Master sheet. This code does not do that and will require a bit of a re-write to do. Give me a bit.
    Last edited by walruseggman; 09-18-2015 at 04:13 PM.

  5. #5
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Macro to Create a Master Sheet and consolidate data as per Headings on all Sheets

    Try the attached.
    Your output columns on are not aligned. I am not sure if you want it that way. As there are no data in Column "H" sheet 2, this should create a gap in you want to align the data.
    Last edited by AB33; 09-19-2015 at 07:10 PM.

  6. #6
    Forum Contributor
    Join Date
    06-03-2004
    Location
    India
    MS-Off Ver
    2013
    Posts
    205

    Re: Macro to Create a Master Sheet and consolidate data as per Headings on all Sheets

    It works leaving gaps in between which I will manage to delete using select blanks - delete - shift cell up

    Thanks for your time and help.

  7. #7
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Macro to Create a Master Sheet and consolidate data as per Headings on all Sheets

    I have added alternative code.

+ 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: 1
    Last Post: 07-17-2014, 12:01 PM
  2. [SOLVED] VBA / Macro help needed to create separate sheets from Master sheet by year
    By krjoshi in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-09-2013, 08:34 AM
  3. Consolidate all the sheets into one master sheet
    By vignesh rocks in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-09-2013, 08:41 AM
  4. Replies: 0
    Last Post: 07-20-2012, 04:44 PM
  5. create sheets' data from master sheet
    By ShadowRider in forum Excel General
    Replies: 9
    Last Post: 10-17-2010, 03:23 AM
  6. Macro to create new sheets from master data sheet
    By adsigel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-04-2006, 09:21 AM

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