Thanks alot!!

- Code: Select all Expand viewCollapse view
`Function Average(first As Long, _`

last As Long) As Double

Dim avg as Double

Dim sum as Double

Dim row as Double

Dim first As Long

Dim last As Long

Dim DATCOL As Long

DATCOL = 1

sum = 0

first=3

last=5

For row = first To last

sum = sum + Activesheet.cells(row,DATCOL)

Next row

avg = sum / (last + 1 - first)

Average = avg

End Function