rbuesseler
Technical User
I don't know why my fuction won't work.
I have several datasets that I need to calculate the slope of the line. They are of varrying length, but are of known length.
x: Column 10, of length "sumloop1" (sumloop1 was previously used as a counter to count how long the column is)
y: Column 11, of length "sumloop1"
Set x1slope45 = Range(Cells(3, 10), Cells(sumloop1, 10))
Set y1slope45 = Range(Cells(3, 11), Cells(sumloop1, 11))
slope45 = Application.WorksheetFunction.Slope(y1slope45, x1slope45)
Cells(1,10) = slope45
I get an error that says: "Unable to get the Slope property of the WorksheetFunction class"
I'm a relative newbie to VBA, so I am sorry if this seems very basic.
Thank you for the timely assistance.
I have several datasets that I need to calculate the slope of the line. They are of varrying length, but are of known length.
x: Column 10, of length "sumloop1" (sumloop1 was previously used as a counter to count how long the column is)
y: Column 11, of length "sumloop1"
Set x1slope45 = Range(Cells(3, 10), Cells(sumloop1, 10))
Set y1slope45 = Range(Cells(3, 11), Cells(sumloop1, 11))
slope45 = Application.WorksheetFunction.Slope(y1slope45, x1slope45)
Cells(1,10) = slope45
I get an error that says: "Unable to get the Slope property of the WorksheetFunction class"
I'm a relative newbie to VBA, so I am sorry if this seems very basic.
Thank you for the timely assistance.