Cell/range as a parameter for function, and calculating average in VBA

I'm trying to recreate the sum function that adds up values within a range, I also want it calculate the average, I will add more calculations later on but so far I'm only testing out the sum portion