How to search and add new column with formula (loop)
Sep 10, 2018 9:24 AM(538 views)
I am trying to write a script for auto_calculation. I have one raw data table and one calculation table. The thing I want to do is to search the column name in the raw data table and then follow the formula (expression) in calculation table to add new column in original raw table. The question now I am struggling is (1) How to search original raw data table (2) How to add the new column and determine the formula (3) The sequence is matter, need to follow the row sequence in calculation table since there are some new columns will use former new column. Thank you all.Original raw data table and calculation tableThe new data table I want to generate by using script
@Wade, I have looked through what you are trying to achieve, In general, it might be easier to achieve what you want if your raw data table i.e. table 1 and calculation table i.e. table with formulae have a common column. If there is a common column or logic to follow, it would be easier to achieve what you are after.
Now, looking through the raw data if you want to use column names such as "Coffee" for reference, given the way the data you have shared is setup, you will need to customize for each column which may not be the most effective solution.
Is it possible for you to take a step back and provide a little more context around your data and what you want to achieve ? It may be easier to achieve ..