Forum Discussion
automatically updating other sheets when data entered based on certain data entered
- Nov 15, 2019
You could also assign a key combination like Ctrl-U to the macro. Then you don't need a button. But something need to trigger the execution of the macro.
I created piece of code that works in a "simplified" workbook that I created based on your data. My aim was to keep it fairly simple, easy to follow and adjustable, even when you are not a VBA expert. I wouldn't even call myself one 🙂
Your example data shows only codes 1 to 9, but you have 29 numbered sheets in your workbook (01 xxxxx to 29 xxxxxx) and only sheets 01 through 04 are formatted such that your sharepoint data fits to the 6 columns you wish to copy. Your workbook is clearly a test case (as its name suggests) and that makes it difficult to insert VBA code that will work in your live environment.
My code has all the target tables starting at A1 and I had to insert a dummy row at the top of the tables. Otherwise, I couldn't get the "xlDown" part of the code to work properly. And then I decided to store all sheet names in a separate table. Thought it was easier to include them in the code like that. A professional VBA programmer might not be impressed, but for me it works just fine 🙂
Selet the SheetNames tab, press the button. When the macro has finished it jumps to A1 in the "SharePoint" tab. You can review the result in each of the Sheets 1 to 9. I hope it helps you insert working VBA in your real workbook.
- nmccoolNov 15, 2019Copper Contributor
Riny_van_Eekelen This is JUST ABOUT perfect. Is there anyway it will update automatically? Without hitting the update Code Button?
- Riny_van_EekelenNov 15, 2019Platinum Contributor
You could also assign a key combination like Ctrl-U to the macro. Then you don't need a button. But something need to trigger the execution of the macro.
- nmccoolNov 18, 2019Copper ContributorI was trying to get Flow to update the workbook (as you seen SharePoint sheet), but Flow doesn't do that yet. Is there a way to have an excel spreadsheet update a macro enabled workbook (automatically)?
- nmccoolNov 15, 2019Copper Contributor
Riny_van_Eekelen thank you, i will trying it this weekend!