+ Reply to Thread
Results 1 to 7 of 7

How to create summary table from data using VBA

  1. #1
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,662

    How to create summary table from data using VBA

    See enclosed excel file. It shows "what data i have" and what data i eventually want via a macro.

    I basically have this table and i want to summarize it
    Consider onlyl Junk1 and Junk2
    Sum Col1 by Lotid

    see enclosed file.....it might more sense.

    I can do this manually via a pivot table but i am not sure how to do it automatically via vba code
    Attached Files Attached Files

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: How to create summary table from data using VBA

    A PivotTable is the best option
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,662

    Re: How to create summary table from data using VBA

    thanks for the reply.

    How would i do the pivot table in vba to get what i want?

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: How to create summary table from data using VBA

    Not sure why you want to do it with VBA, but start by recording a macro

  5. #5
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,662

    Re: How to create summary table from data using VBA

    I have these files i am trying to automate the collection and presentation of some data. This is why i am trying to do it via vba. I will try and record a macro like you suggested.

  6. #6
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,662

    Re: How to create summary table from data using VBA

    i have not worked much with pivot tables...........in fact none.

    I was wondering if i should use pivot tables here or just use a bunch of arrays and do i tthat way? Any thoughts?

  7. #7
    Valued Forum Contributor
    Join Date
    06-19-2010
    Location
    Holywell, N Wales, UK
    MS-Off Ver
    Excel 2013
    Posts
    470

    Re: How to create summary table from data using VBA

    Hi welchs101
    I have had a go at this in VBA for you
    Note that I have written the results to a new sheet called ..er .. 'Results'
    Run the macro called 'summarise'
    I would agree with RoyUK that using a PivotTable is probably the best route
    Barry
    Attached Files Attached Files

+ 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