Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with automated regression

Status
Not open for further replies.

Idstern

Technical User
Sep 28, 2004
1
0
0
US
I am new to VBA coding and could really use some help. Is there a way to have vba sort through data, try each of excels regression techniques, choose the one with the highest R^2, and then save the regression formula as a variable? Any help would be greatly appreaciated.
 
You could use Excels built in objects to store a formula, but you can't store it in a variable - however variables could form part of a formula that you construct in vba. If you know what actions you want to perform in Excel (for instance highlight 10 cells, sort by column A, then B etc), you could use the Macro recorder under Tools to record a Macro (basically VBA code), and then view in the VBA editor to see what excel is doing - and from there adapt it to suit your purposes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top