+ Reply to Thread
Results 1 to 5 of 5

Many reports from one worksheet

  1. #1
    Registered User
    Join Date
    03-01-2019
    Location
    SARAJEVO
    MS-Off Ver
    2013
    Posts
    47

    Many reports from one worksheet

    Good day to all.
    I have a few problems that I'm trying to solve using macros.
    Namely, I have a worksheet called "Report" and it serves as a source of data. From that worksheet, I try to select a specific user (in this case "C") and get another worksheet that will be called "C" and that shows only what that user used (worksheet "C").

    In the second case, I want to get from the same data source data related to only a certain article (in this case "A4 80g paper" in the way it is shown in the worksheet "A4 80g paper", and that in cell "A2" is the name of the item that are in the table ("Box 5 reams / 500 sheets UPM Multifunction A4 80g paper").

    The third case is similar to the second only in terms of toners.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,184

    Re: Many reports from one worksheet

    This could be done using formula rather than VBA by providing selection criteria e.g Customer or Product.

    Example attached in sheet "CX"

    in B9 and copied across

    =IFERROR(INDEX(Report!B$9:B$1000,AGGREGATE(15,6,ROW($A$1:$A$1000)/(Report!$F$9:$F$1000="C"),ROWS($1:1))),"")

    Although not shown, TOTAL could be put in row 9 rather at the end to cater for variable number of rows for selected customer.

    Customer "C" could be selected from a drop-down list.

    Similar formula for product

    =IFERROR(INDEX(Report!B$9:B$1000,AGGREGATE(15,6,ROW($A$1:$A$1000)/(Report!$C$9:$C$1000="Product Description"),ROWS($1:1))),"")


    Questions: how are Customer/ Product to be selected? Do you want a sheet per Customer/Product or a single sheet for each where the data relates a Customer/Product Selection?


    Equally, a macro could add these formula to a selected sheet, changing the Customer/Product reference.
    Attached Files Attached Files
    Last edited by JohnTopley; 12-16-2021 at 11:42 AM.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Registered User
    Join Date
    03-01-2019
    Location
    SARAJEVO
    MS-Off Ver
    2013
    Posts
    47

    Re: Many reports from one worksheet

    I would like to select Customer / Product from drop-down list and to get a results of selected Customer / Product in single sheet where the data relates a Customer / Product Selection.

  4. #4
    Valued Forum Contributor
    Join Date
    08-03-2012
    Location
    Newcastle
    MS-Off Ver
    Excel 2007, 2010, 2013, 2016, Office 365
    Posts
    467

    Re: Many reports from one worksheet

    Hi

    In the attached example file, on sheet [Report] I have added a couple of 'buttons' (using Insert>Shape).
    After creating macros, you can assign macros to any shape by right-clicking the Shape and then selecting 'Assign macro' from the right-click-menu.

    The [Show ALL Records] button simply cancels any filtered-data, and scrolls the screen to the top of the data Records.

    With Inventory data, I have often found it useful to 'filter-records-as-you-type'.
    So I added a yellow textbox above the Product Item name column C. As you type in the yellow textbox, you will see records matching 'what-you-type'. For example, start typing 'paper' and you will begin to see records which include 'paper clips', 'paper refills' etc etc. Thanks to all the experts who contributed to this useful trick.

    To reset, just click the [Show ALL Records] button.

    The [export Customer Report] button is used to copy filtered-data-records for a selected Customer picked via the Customer filter-drop-down arrow in column F. The data records are copied to a new sheet using the Customer name for the sheet tabname.
    If the Customer sheet already exists, you will be asked whether you want to overwrite it.

    When records are extracted for a selected Customer, you can either keep the existing Record Numbers from the master [Report] sheet (useful for checking) or you can have the Records re-numbered for that Customer on their sheet.

    As it is the season for kindness, I have also included a useful double-click-sorting feature. If you double-click on any heading cell in row 8, the records will be sorted. If you double-click the same heading cell again, the sort order is reversed. So you can easily show, for example, the Products ranked by Total Cost by double-clicking cell [K8], or easily group Products by Transaction Type by double-clicking in cell [D8], or by date order by double-clicking cell [B8] etc etc etc.

    The code for the double-click feature is included on the [blankCustomer] sheet, so you can also use this double-click on Customer sheets created via the [export Customer Report] button. Thus you could double-click on the Quantity heading cell to see the most quantity items for the Customer etc etc.

    This should get you started.

    I noticed the Product Item sheets in your sample posted file had a slightly different layout to the [Report] sheet headings, e.g. extra columns for Consumption. It is not clear how you would want to deal with this. I have included a [blankProduct] sheet as a starting point.

    If you have any questions, please ask here again. There is always help available.

    zeddy
    Merry Everything and Happy Always
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    03-01-2019
    Location
    SARAJEVO
    MS-Off Ver
    2013
    Posts
    47

    Re: Many reports from one worksheet

    Thanks a lot, that's what I was looking for.
    And you're right, in my (A4 80g paper sheet) or your [blankProduct] sheet I only want to use for consumption of paper (Box 5 reams / 500 sheets UPM Multifunction A4 80g paper).

+ 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. Create Monthly Reports from Source Worksheet
    By dwolcott in forum Excel General
    Replies: 1
    Last Post: 12-22-2019, 10:31 PM
  2. [SOLVED] bring over data to worksheet from raw extracted reports
    By Shamz41 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-02-2019, 07:10 AM
  3. Replies: 1
    Last Post: 04-24-2014, 01:33 PM
  4. Macro to generate reports for questionnaire (separate reports for every form)
    By skyvik24 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-25-2013, 05:25 AM
  5. Auto-Generate Reports From another worksheet
    By kraddark in forum Excel General
    Replies: 8
    Last Post: 06-09-2011, 08:17 AM
  6. Merging different worksheet reports
    By Beaty in forum Excel General
    Replies: 6
    Last Post: 08-05-2010, 08:24 AM
  7. Printing multiple reports with one worksheet
    By dlythgoe in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-02-2009, 06:34 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