View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Application.worksheetfunction

Or did you mean

A = Application.Average(Range("F3:F53"))

--
Regards,
Tom Ogilvy


"Myrna Larson" wrote in message
...
You want to get the average of the range F3:F53, ignoring cells that

contain
empty text or are blank, right?

AVERAGE ignores blanks and text, so why can't you use just

A = Application.SUM(Range("F3:F53"))

instead of SUMIF and COUNTIF?


On Mon, 11 Oct 2004 09:29:24 GMT, "Terry V" wrote:

Hello
Im trying to create a function for a userform that averages a range on a
sheet based on weather the values are not = "".

EX: the formula in my cells on the sheet (time cells) is this:
=IF(ISBLANK($B7),"",SUM(B7:E7))

Im not sure why, but even on my sheet I cannot get the right answer but
anyways:

On the userform, Im taking the average of cells F3:F53
I ve tried the Application.WorksheetFunction.Sumif
(F3:F53,"<""""")/Application.WorksheetFunction.CountIf(F3:F53,"<"" """)

But as most of you probably know, it did not work (overflow).
I tried placing the range into a range variable set

fr=range("Times!F3:F53")
and using this instead of the range in the worksheetfunction formula.

How can I place this into a textbox on my userform as the average of that
range (assuming there will be values that have a "" value?

Thank you so much
Terry V