How to perform a regression from within a programmed macro

Sparky_

New Member
Joined
Dec 10, 2010
Messages
39
I have worksheets of data in the same format (different data / same format) - I am needing to routinely needing to perform a regression analysis on this data.

A recorded macro (shortcut key) would be very helpful.

I have attempted and continue to strike out to record a macro that:
goes to data tab, selects data analysis, selects regression and so forth.

I get an error when running the macro: Run-Time error 1004
We couldn't find: ... atpvbaen.xlam

My recorded macro appears to be one (1) line of code

Can a recorded macro include a regression analysis?

Help?

Thanks
Sparky_
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
open the visual basic window, (alt F11) then under tools select references, look down the list to find atpvbaen and tick the box. then try your macor again.
 
Upvote 0
the list appears alphabetic. I do not appear to have that file or option. the only atp*** I have within the long list is ATP 2.0 Type Library

How do I add this or is there another problem?

Thanks
 
Upvote 0
It sounds like you need to include the analysis toolpack as an addin
go to File/optioins/Addins and select Excel addins and go then select the box against Analysis toolpack VBA. then do post #2 above
 
Upvote 0
currently (meaning without touching it), I have Analysis ToolPak and Solver Add-ins checked.
Analysis ToolPak-VBA is not checked. .... Check that one?

Thanks
 
Upvote 0
Yes, Analysis Toolpak - VBa unchecked would definitely cause the "We couldn't find: ... atpvbaen.xlam"
you also need to go and find under VBA/tools/ reference as well, so don't forget to do that too.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,853
Members
452,361
Latest member
d3ad3y3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top