Actually, I’ve figured out a much better/faster way to do this with Coda formulas (and a helper table)