I am really new to vba and struggling with this issue :
I am trying to successively change one cells with data from a table, let the result being calculated and save the result into another table.
basically I would love it to work like that :
+++
- Manually input data into the base table (say "basetbl")
- The worksheet calculates the intermediary values with excel formulas
- The vba macro changes the value of a targeted cells, I believe the code would roughly look like below :
Dim n as Integer, i as Integer n = range("basetbl[#Data]").Rows.Count For i = 1 to n Range("E41") = basetbl(row i column1) ' refresh worksheet to calculate the final value' Application.Calculate 'save the calculated result in cell C57 to the result table (say "resultstbl")' resultstbl[row i, column 2] = Range("C57") i + 1 End For The reason why I need the worksheet to be refreshed is because the cell E41 is linked to a look up for multiple values in the basetbl, and I need the whole worksheet to be recalculated. I also don't want to input the whole calculation into vba because I need to see the different steps in the calculation, change constants etc... thanks !