Forum Discussion

MattChisholm's avatar
MattChisholm
Copper Contributor
Sep 23, 2020

Auto-populate worksheets from a source worksheet based on data input

Hi MS Tech Community,

 

I have a dilemma that I have been trying to search a solution to for quite a while. I manage a massive inventory of cannabis excise tax stamps. I am constantly issuing thousands of stamps for multiple work orders across multiple provinces everyday. My tool for tracking all these transactions is Excel.

 

My question is in regards to auto populating multiple tabs across a workbook based on data inputted into a source sheet. I know how to use the formula based option however that is more work than I really want to spend time doing. Can I assign specific columns to recognize the data and correlate that information to the correct tab and column in the dependent work sheets?

 

Example.

 

DateProvinceLineW/O NumberIssuedUsedDamagedUnaccountableReturned
         
1-JulBritish ColumbiaPre-Rolls15026419028881400
1-JulNova ScotiaPre-Rolls1502642297288900
1-JulAlbertaPre-Rolls15026305,4191,6806-63,727
1-JulNewfoundlandPre-Rolls1502638232512001701108
1-JulManitobaPre-Rolls15026393,5311,2003+12,329
1-JulQuebecPre-Rolls15026401,6781,2008-2468

 

I would like to be able to have column B (Province Column) recognize 1 of 10 tabs. If I type in Newfoundland it will recognize to populate the information into the Tab that's titled NFLD. Then have the information from column D (W/O #) auto-populate the W/O cell in the dependent NFLD tab. The same of Column E (issued) and I (returned). Essentially the top row of the dependent province work sheet will have the complete inventory amount for that province and as I populate the source sheet, I would like the dependent province sheets to auto-populate and keep track of the inventory automatically.

 

Is this something that is possible? Any tips or tricks would be greatly appreciated.

 

I have attached a test copy of the work book.

 

Much Thanks

Matt

5 Replies

  • MattChisholm ,

     

    You have many options. I recommend PowerQuery (PQ). Setup is a bit tedious but straight forward. One setup and we add new transactions to Rec Excise Tracking we can click the Data > Refresh All and every tab will update nicely. 

     

    NOTES

    1. PQ will convert Rec Excise Tracking to a table so I recommend making it a table and naming it tblSource before PQ does so the name means something. 

    2. Use PQ to create each result query. You will need 1 for each tab. Just duplicate the one I created, rename it, then double click the Filtered Rows step and choose which provinces to include for each query.
    3. Load the query to the appropriate tab then insert a few columns:
      1. Row - enter formula =ROW()-ROW([#Headers])
      2. Start - enter formula =IF([@Row]=1,B1,INDEX([End],[@Row]-1))
      3. End - enter formaul=[@Start]+[@[Add/Sub]]

    • MattChisholm's avatar
      MattChisholm
      Copper Contributor

      Craig Hatmaker 

       

      Thank you very much for the response. I was ok at Excel 2007 but have lost  a lot of the info I retained in the last dozen years or so. Am I launching PQ correctly by clicking the Data > From Table /Range button?

       

      I'm not familiar with Power Query.

       

      Maybe I'm not understanding correctly but once I have this totally set up will I be able to save it as a template and then use a new workbook every month?

       

      Thanks for the info.

       

      Matt

      • Craig Hatmaker's avatar
        Craig Hatmaker
        Iron Contributor

        MattChisholm 

         

        Yes to all questions. But to clarify, all you have to do is update the one worksheet with the transactions then press refresh all to update all other worksheets.

Resources