PDA

View Full Version : Solved: VBA What If Analysis (Data Tables)



greglittle
11-02-2012, 12:46 PM
Does anyone know the VBA behind Excel's "What If Analysis" one-way data tables?

I have to do NPV sensitivity on about 100 different variables for a complex model (spans about 20 worksheets) and I don't want to have to manually create each of the data tables using the "What If Analysis" button. I would much rather throw it into a loop and have it spit out the different data tables on one sheet.

I have looked all over without finding anything. Thanks in advance for your help!

Teeroy
11-03-2012, 11:38 PM
Have a look at this reference for using the solver add-in with VBA http://peltiertech.com/Excel/SolverVBA.html. (http://peltiertech.com/Excel/SolverVBA.html)

greglittle
11-05-2012, 09:54 AM
Thanks, Teeroy. That helps a lot.