(Solved) – Application.Evaluate(item) always uses first row as base, why?


I have a bunch of tabel-based formulas saved in a list, that I would like to run on each row until I get a result.
When ever I use below code, the formulas however, always use the first row of the tabel as base.

For Each rng In sqltabel.ListColumns("coloum1").DataBodyRange.Rows
    For Each item In arr    
        rng.Offset(0, sqlcolumn) = Application.Evaluate(item)

A formula in the ‘arr’ could look like


So if the first row, column10, contains “stack” all other rows’ formulas will end on the same formula and post “overflow” as result.
What am I doing wrong, or am I not understanding the Evaluate application?

As a quick-fix I’m using the below code, but I was hoping to avoid it, as it slows down the macro.

rng.Offset(0, sqlcolumn).FormulaArray = _

Leave a Reply

Your email address will not be published. Required fields are marked *