View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
kkknie[_117_] kkknie[_117_] is offline
external usenet poster
 
Posts: 1
Default Range Notation for Excel Functions in VBA

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