'Import coefficients from a tab
I really need your help for a google script project. I have a sheet with 2 tabs. One with parameters and associated coefficients. (columns 1, 2 and 3) --> TAB 1
I have another tab with other parameters (some parameters are in common) and associated coefficients --> TAB 2
I'd like to create a code that imports the coefficients from TAB 2 and places them next to the correct parameters on TAB 1. In other words, I would like to compare them so place them right next to the coefficients already filled in and opposite the correct parameter in TAB 1.
My code may need to start with something like:
var identifiers = []
var database = []
Base.getRange('A11:L' + Base.getLastRow()).getValues().forEach(r => {
let id = r[0].toString()
if (r[7] != '') {
ids.push(id)
dataBase.push([r[7], r[8]])
}
if (r[9] != '') {
ids.push(id)
dataBase.push([r[9], r[10]])
}
if (r[11] != '') {
ids.push(id)
dataBase.push([r[11], r[12]])
}
})`
I need your help, thank you in advance
Solution 1:[1]
You can check the simplified sheet: https://docs.google.com/spreadsheets/d/12zxuXmYpC8EGjKxiYH_LIqLQlEgPAZjNxwokvFTU294/edit?usp=sharing
The input are the A coefficient and the B coefficient in the first tab ("CR-MR") and those of the second tab ("Base"). The output must be a board (see picture) with the A coefficient and B coefficient of the first tab, and in the right the A coefficient and the B coefficient of the second tab.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | user19031018 |
