Forum Discussion
Stanis1
Oct 26, 2022Copper Contributor
Excel update rows with script (two tables)
Hi, I'm very new at excel online and typescript,I have two tables,in table 1 there are records of employees and their departments like "ID:1 ,Name:Alex,Department:2", and in the table 2 I have only t...
mtarler
Oct 26, 2022Silver Contributor
Why don't you 'build' table 1 based on table 2 (and maybe other tables)
It would be better to have a 'master' list (i.e. table 1) and then use pivot table or FILTER to show the sub-list (i.e. table 2) but (especially with the new functions like vstack) you could have a table for each department and then make table 1 a combination of those sub-tables so table 1 would be for viewing/reporting and sub-tables 2-x would be the 'master' tables.
It would be better to have a 'master' list (i.e. table 1) and then use pivot table or FILTER to show the sub-list (i.e. table 2) but (especially with the new functions like vstack) you could have a table for each department and then make table 1 a combination of those sub-tables so table 1 would be for viewing/reporting and sub-tables 2-x would be the 'master' tables.
- Stanis1Oct 26, 2022Copper ContributorI think that this is very good idea,but I work in bussines and they want it like that, in script...
I don't know so much of scripts, i only want solution thaht updates the master table when one of secodary tables are edited,thanks!- mtarlerOct 26, 2022Silver ContributorI've only dabbled in scripts but my recollection is that a script doesn't have an on-event equivalent. By that what I mean is I know that macros have events that are triggered and you can write code to happen when data changes, but I believe a script has to be manually run. They have added buttons to make that easier to do but a button would still need to be clicked to execute the update script.
- Stanis1Oct 27, 2022Copper ContributorFor who triggers the script don't worry, all is in powerautomate flow, mtarler,you know what code I have to write in the sripts for update one to other? thanks!