updateFormulaChain = function(x, y, records) {
    const obj = this;

    const cellId = getColumnNameFromId([x, y]);
    if (obj.formula[cellId] && obj.formula[cellId].length > 0) {
        if (chainLoopProtection[cellId]) {
            obj.records[y][x].element.innerHTML = '#ERROR';
            obj.formula[cellId] = '';
        } else {
            // Protection
            chainLoopProtection[cellId] = true;

            for (let i = 0; i < obj.formula[cellId].length; i++) {
                const cell = getIdFromColumnName(obj.formula[cellId][i], true);
                // Update cell
                const value = ''+obj.options.data[cell[1]][cell[0]];
                if (value.substr(0,1) == '=') {
                    records.push(updateCell.call(obj, cell[0], cell[1], value, true));
                } else {
                    // No longer a formula, remove from the chain
                    Object.keys(obj.formula)[i] = null;
                }
                updateFormulaChain.call(obj, cell[0], cell[1], records);
            }
        }
    }

    chainLoopProtection = [];
}
Update all related cells in the chain