p45cal, thanks for the tips here! I'm getting a run-time error when the code looks for ATPVBAEN.XLAM. It can't find this file.
Here's what I have for the slightly modified code:
Sub Macro6()
Sheets("Jo - Price Predictor").Select
lrA = Cells(Rows.Count, "A").End(xlUp).Row
lrB = Cells(Rows.Count, "B").End(xlUp).Row
lrC = Cells(Rows.Count, "C").End(xlUp).Row
lrD = Cells(Rows.Count, "D").End(xlUp).Row
lrE = Cells(Rows.Count, "E").End(xlUp).Row
lrF = Cells(Rows.Count, "F").End(xlUp).Row
lr = Application.Max(lrA, lrF) 'or Min? I expect the x and y have to have the same number of values?
Application.Run "ATPVBAEN.XLAM!Regress", ActiveSheet.Range("F1:F" & lr), ActiveSheet.Range("A1:A" & lrE), False, True, 95, ActiveSheet.Range("P1"), False, False, False, False, ActiveSheet.Range("X3"), False
End Sub
Any ideas? Also what is the "X3" for at the end of the code?