+ Reply to Thread
Results 1 to 6 of 6

Need help breaking a report into mulitple sorted/formatted reports

  1. #1
    Registered User
    Join Date
    03-15-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2010
    Posts
    25

    Need help breaking a report into mulitple sorted/formatted reports

    This is my first post so forgive me if I do anything incorrectly. I have a test file with about 50 records. Each record contains a serial number of a device and an application that is installed on that device as well as additional information. My ultimate goal is to have the macro break this report into individual reports for each workstation. In addition to that I would like certain records to be deleted and others sorted into sections based on whether or not the application appears in a preset list in another worksheet. I've attached 3 files. The Mock file contains the macro. It has 4 sheets (EXAMPLE, DELETE, SECTION1, SECTION2). TestFile contains test data. Machine1 contains what the macro currently outputs. Right now the output is just a sheet with the list of apps for a specific machine. Looking at the EXAMPLE worksheet you can see how I would like it ultimately formatted. Any apps present in the DELETE Worksheet should be deleted. Any apps in the REPLACE worksheet should have the replacement put in section 1. Any Apps in the SECTION2 worksheet should be put in Section 2. All remaining records should be put in Section 3. I've never used VBA but what code you see I was able to put together in a day and a half so i'm a quick learner. Any help would be appreciated!

    Note: some code is for future purposes such as SetHeaderInfo(). Also this requires a directory of "C:\WKSTEMP\" to save the files.

    Here is the current macro:

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    03-15-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: Need help breaking a report into mulitple sorted/formatted reports

    I have 2 posts and i haven't gotten a response for either. I don't mean to be impatient. I just want to make sure I haven't done anything wrong to cause people to avoid helping me. These are my first posts. If anyone could kindly point me in the right direction I would appreciate the help. Thanks

  3. #3
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Need help breaking a report into mulitple sorted/formatted reports

    You will need to explain a little bit more. What data should be extracted, the whole data set for each machine or certain columns?
    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]

  4. #4
    Registered User
    Join Date
    03-15-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: Need help breaking a report into mulitple sorted/formatted reports

    The data that needs to be extracted is represented in the Machine1 file attached. This includes Columns L through Q from the original file. This is what is currently being output by the macro so far but I am not opposed to going a different route if you have a better way. I basically stripped the rest of the data using my FormatData() function but I did pull columns B, and D as well using the SetHeader() function. The info from those columns is used in the top section of the final report. (Also note that Column A was used to generate the name of the new worksheets and thus the new files.) There is probably a more straightforward way to get what I wanted but I am working from a limited skill set. Thanks for your help. Also you responded to my other post which was me working on this from a different direction so don't worry about that post unless you're interested in the code I was working on to sort the data. Thanks!

  5. #5
    Forum Contributor
    Join Date
    04-03-2011
    Location
    India
    MS-Off Ver
    Excel 2015
    Posts
    122

    Re: Need help breaking a report into mulitple sorted/formatted reports

    someone or me will help u .. dont worry

  6. #6
    Registered User
    Join Date
    03-15-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: Need help breaking a report into mulitple sorted/formatted reports

    I've made some very good progress so I thought I would share where I am. I've also attached new files to work from for anyone trying to assist me. If you look at the Machine1 file you will see I've been able to insert the header with the correct info and classify the files using the numbers 0-3. Using numbers made it easy to sort. In the resulting file "Machine1" you'll notice there are no 0's. These were deleted as was part of my requirements. Now what I need to do is insert Section2 and Section3 Headers as well as replace any records marked as 1 with their replacements (See sheet named "SECTION1") I would also like some error checking as I realized that actual data may not have files marked as 1 2 or 3. I'm working hard but any help is greatly appreciated

    New code is below:

    Please Login or Register  to view this content.
    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