It all depends on what start_data, end_data, start_time and end_tim
are. If they are range addresses (like A1), use:
mySlope = Application.WorksheetFunction.Slope(Range(start_da ta & ":"
end_data),Range(start_time & ":" & end_time))
If they are row numbers for a known column (I'll use A and B), use:
mySlope = Application.WorksheetFunction.Slope(Range("A" & start_data
":A" & end_data),Range("B" & start_time & ":B" & end_time))
--
Message posted from
http://www.ExcelForum.com