View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
NewToVB NewToVB is offline
external usenet poster
 
Posts: 48
Default Range.Average Problem

Ok, I figured out whats going on.... but I'm not sure how to correct it. The
reason I'm getting all zeros is because either my numbers are less than 0.5
or they are negative. I don't know why its rounding. Any ideas on how to
correct this?

"Tom Ogilvy" wrote:

I don't know what LCV is a reference to, but I suspect

LCV.Range doesn't point where you think it does

or

LCV.Range is blank

or

LCV.Range

doesn't contain any numbers (or contains numbers that are stored as text
strings).

if you try using Average in a cell going against the range you want averaged
and get a valid answer, then you can disregard the stored as strings.

--
Regards,
Tom Ogilvy

"NewToVB" wrote:

I'm trying to average I3:I & c + 2
but I keep getting zeros. Any ideas why?

CSVCICAvg = LCV.WorksheetFunction.Average(LCV.Range("I3:I" & (c + 2)))