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

%3CLINGO-SUB%20id%3D%22lingo-sub-1704109%22%20slang%3D%22en-US%22%3EAuto-populate%20worksheets%20from%20a%20source%20worksheet%20based%20on%20data%20input%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1704109%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20MS%20Tech%20Community%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20a%20dilemma%20that%20I%20have%20been%20trying%20to%20search%20a%20solution%20to%20for%20quite%20a%20while.%20I%20manage%20a%20massive%20inventory%20of%20cannabis%20excise%20tax%20stamps.%20I%20am%20constantly%20issuing%20thousands%20of%20stamps%20for%20multiple%20work%20orders%20across%20multiple%20provinces%20everyday.%20My%20tool%20for%20tracking%20all%20these%20transactions%20is%20Excel.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMy%20question%20is%20in%20regards%20to%20auto%20populating%20multiple%20tabs%20across%20a%20workbook%20based%20on%20data%20inputted%20into%20a%20source%20sheet.%20I%20know%20how%20to%20use%20the%20formula%20based%20option%20however%20that%20is%20more%20work%20than%20I%20really%20want%20to%20spend%20time%20doing.%20Can%20I%20assign%20specific%20columns%20to%20recognize%20the%20data%20and%20correlate%20that%20information%20to%20the%20correct%20tab%20and%20column%20in%20the%20dependent%20work%20sheets%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EExample.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CTABLE%20width%3D%22794%22%3E%3CTBODY%3E%3CTR%3E%3CTD%20width%3D%2264%22%3EDate%3C%2FTD%3E%3CTD%20width%3D%22139%22%3EProvince%3C%2FTD%3E%3CTD%20width%3D%2297%22%3ELine%3C%2FTD%3E%3CTD%20width%3D%22125%22%3EW%2FO%20Number%3C%2FTD%3E%3CTD%20width%3D%22101%22%3EIssued%3C%2FTD%3E%3CTD%20width%3D%2264%22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2FTD%3E%3CTD%3E3%2C727%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E1-Jul%3C%2FTD%3E%3CTD%3ENewfoundland%3C%2FTD%3E%3CTD%3EPre-Rolls%3C%2FTD%3E%3CTD%3E1502638%3C%2FTD%3E%3CTD%3E2325%3C%2FTD%3E%3CTD%3E1200%3C%2FTD%3E%3CTD%3E17%3C%2FTD%3E%3CTD%3E0%3C%2FTD%3E%3CTD%3E1108%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E1-Jul%3C%2FTD%3E%3CTD%3EManitoba%3C%2FTD%3E%3CTD%3EPre-Rolls%3C%2FTD%3E%3CTD%3E1502639%3C%2FTD%3E%3CTD%3E3%2C531%3C%2FTD%3E%3CTD%3E1%2C200%3C%2FTD%3E%3CTD%3E3%3C%2FTD%3E%3CTD%3E%2B1%3C%2FTD%3E%3CTD%3E2%2C329%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E1-Jul%3C%2FTD%3E%3CTD%3EQuebec%3C%2FTD%3E%3CTD%3EPre-Rolls%3C%2FTD%3E%3CTD%3E1502640%3C%2FTD%3E%3CTD%3E1%2C678%3C%2FTD%3E%3CTD%3E1%2C200%3C%2FTD%3E%3CTD%3E8%3C%2FTD%3E%3CTD%3E-2%3C%2FTD%3E%3CTD%3E468%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20would%20like%20to%20be%20able%20to%20have%20column%20B%20(Province%20Column)%20recognize%201%20of%2010%20tabs.%20If%20I%20type%20in%20Newfoundland%20it%20will%20recognize%20to%20populate%20the%20information%20into%20the%20Tab%20that's%20titled%20NFLD.%20Then%20have%20the%20information%20from%20column%20D%20(W%2FO%20%23)%20auto-populate%20the%20W%2FO%20cell%20in%20the%20dependent%20NFLD%20tab.%20The%20same%20of%20Column%20E%20(issued)%20and%20I%20(returned).%20Essentially%20the%20top%20row%20of%20the%20dependent%20province%20work%20sheet%20will%20have%20the%20complete%20inventory%20amount%20for%20that%20province%20and%20as%20I%20populate%20the%20source%20sheet%2C%20I%20would%20like%20the%20dependent%20province%20sheets%20to%20auto-populate%20and%20keep%20track%20of%20the%20inventory%20automatically.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20this%20something%20that%20is%20possible%3F%20Any%20tips%20or%20tricks%20would%20be%20greatly%20appreciated.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20attached%20a%20test%20copy%20of%20the%20work%20book.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMuch%20Thanks%3C%2FP%3E%3CP%3EMatt%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1704109%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1704647%22%20slang%3D%22en-US%22%3ERe%3A%20Auto-populate%20worksheets%20from%20a%20source%20worksheet%20based%20on%20data%20input%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1704647%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F805969%22%20target%3D%22_blank%22%3E%40MattChisholm%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20have%20many%20options.%20I%20recommend%20PowerQuery%20(PQ).%20Setup%20is%20a%20bit%20tedious%20but%20straight%20forward.%20One%20setup%20and%20we%20add%20new%20transactions%20to%20%3CSTRONG%3ERec%20Excise%20Tracking%3C%2FSTRONG%3E%20we%20can%20click%20the%20%3CSTRONG%3EData%3C%2FSTRONG%3E%26nbsp%3B%26gt%3B%20%3CSTRONG%3ERefresh%20All%3C%2FSTRONG%3E%26nbsp%3Band%20every%20tab%20will%20update%20nicely.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENOTES%3C%2FP%3E%3COL%3E%3CLI%3EPQ%20will%20convert%20%3CSTRONG%3ERec%20Excise%20Tracking%3C%2FSTRONG%3E%20to%20a%20table%20so%20I%20recommend%20making%20it%20a%20table%20and%20naming%20it%20%3CSTRONG%3EtblSource%3C%2FSTRONG%3E%26nbsp%3Bbefore%20PQ%20does%20so%20the%20name%20means%20something.%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLI%3E%3CLI%3EUse%20PQ%20to%20create%20each%20result%20query.%20You%20will%20need%201%20for%20each%20tab.%20Just%20duplicate%20the%20one%20I%20created%2C%20rename%20it%2C%20then%20double%20click%20the%20%3CSTRONG%3EFiltered%20Rows%3C%2FSTRONG%3E%20step%20and%20choose%20which%20provinces%20to%20include%20for%20each%20query.%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Filter.png%22%20style%3D%22width%3A%20700px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F221589iB32BCDF3723B5A6D%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Filter.png%22%20alt%3D%22Filter.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3ELoad%20the%20query%20to%20the%20appropriate%20tab%20then%20insert%20a%20few%20columns%3A%3COL%20class%3D%22lia-list-style-type-lower-alpha%22%3E%3CLI%3E%3CSTRONG%3ERow%3C%2FSTRONG%3E%20-%20enter%20formula%26nbsp%3B%3CSTRONG%3E%3DROW()-ROW(%5B%23Headers%5D)%3C%2FSTRONG%3E%3C%2FLI%3E%3CLI%3E%3CSTRONG%3EStart%3C%2FSTRONG%3E%20-%20enter%20formula%26nbsp%3B%3CSTRONG%3E%3DIF(%5B%40Row%5D%3D1%2CB1%2CINDEX(%5BEnd%5D%2C%5B%40Row%5D-1))%3C%2FSTRONG%3E%3C%2FLI%3E%3CLI%3E%3CSTRONG%3EEnd%20%3C%2FSTRONG%3E-%20enter%20formaul%3CSTRONG%3E%3D%5B%40Start%5D%2B%5B%40%5BAdd%2FSub%5D%5D%3C%2FSTRONG%3E%3C%2FLI%3E%3C%2FOL%3E%3C%2FLI%3E%3C%2FOL%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22table.png%22%20style%3D%22width%3A%20506px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F221590i684976FB0C1245ED%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22table.png%22%20alt%3D%22table.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1715127%22%20slang%3D%22en-US%22%3ERe%3A%20Auto-populate%20worksheets%20from%20a%20source%20worksheet%20based%20on%20data%20input%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1715127%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F805969%22%20target%3D%22_blank%22%3E%40MattChisholm%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYes%20to%20all%20questions.%20But%20to%20clarify%2C%20all%20you%20have%20to%20do%20is%20update%20the%20one%20worksheet%20with%20the%20transactions%20then%20press%20refresh%20all%20to%20update%20all%20other%20worksheets.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1751881%22%20slang%3D%22en-US%22%3ERe%3A%20Auto-populate%20worksheets%20from%20a%20source%20worksheet%20based%20on%20data%20input%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1751881%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F805969%22%20target%3D%22_blank%22%3E%40MattChisholm%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20looked%20at%20your%20new%20workbook%20and%20then%20I%20put%20your%20new%20data%20into%20the%20workbook%20I%20gave%20you%20and%20updated%20it.%20This%20is%20what%20I%20got.%20As%20you%20can%20see%2C%20the%20formulas%20work.%20So%20what%20went%20wrong%3F%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22BXLTemp.png%22%20style%3D%22width%3A%20457px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F224706i6D534DCF5533A28D%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22BXLTemp.png%22%20alt%3D%22BXLTemp.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20your%20new%20workbook%20you%20added%20formulas%20to%20tblSource.%20Do%20not%20change%20tblSource.%20We%20want%20the%20new%20formulas%20in%20the%20dependent%20worksheets%20only.%20When%20they%20are%20in%20tblSource%20and%20we%20use%20PowerQuery%20to%20read%20it%2C%20PQ%20changes%20all%20formulas%20to%20values.%20We%20need%20them%20to%20stay%20formulas.%20When%20we%20read%20tblSource%20with%20PQ%20and%20then%20place%20the%20filtered%20results%20in%20dependent%20worksheets%2C%20Excel%20merges%20the%20query%20fields%20with%20the%20table%20which%20includes%20formulas%20and%20all%20works%20well.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHope%20that%20helps%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

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
Highlighted

@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.Filter.png
  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]]

table.png

Highlighted

@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

Highlighted

@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.

Highlighted

@Craig Hatmaker 

 

Hello Again Craig,

 

So I'm still struggling to get this workbook set up exactly as I want it. I thought I had everything figured out and I've created my template, but when I load in Septembers numbers and then hit refresh it automatically deletes the formulas for the ROW, START and END column and does not auto tabulate any of that information and leaves those columns entirely blank.

 

I also noticed that the custom column you created (Add/Sub) had the wrong formula assigned to it. It should actually just be "[Issued]-[Returned]" instead of including the issued, used and damaged as well. The formula could also be  [Used]+[Damaged]+[Unaccountable] but [Issued]-[Returned] is what I have it set as currently.

 

The END column formula should also be =[@Start]-[@[Add/Sub]] to get the accurate amount removed from inventory.

 

But regardless of all that like I said before whenever I add the info, in this case all of Septembers numbers and then hit refresh any of the formulas that were present get deleted and then the columns appear blank.

 

Capture1.JPG

 

Capture2.JPG

  

Am I suppose to input the formulas every time? That would defeat the purpose of trying to automate the withdrawn amounts as I track it per work order.

 

Thanks for the help thus far...I've added both the blank template that I was hoping to be able to use at the beginning of every month and the populated version with Septembers numbers in it. I did not hit Refresh on it so you can see what it is that I am referring.

 

Matt Chisholm

Highlighted

@MattChisholm 

 

I looked at your new workbook and then I put your new data into the workbook I gave you and updated it. This is what I got. As you can see, the formulas work. So what went wrong?

BXLTemp.png

 

In your new workbook you added formulas to tblSource. Do not change tblSource. We want the new formulas in the dependent worksheets only. When they are in tblSource and we use PowerQuery to read it, PQ changes all formulas to values. We need them to stay formulas. When we read tblSource with PQ and then place the filtered results in dependent worksheets, Excel merges the query fields with the table which includes formulas and all works well. 

 

Hope that helps