From: ppeer on
Hi p45cal,

Column D with the numbers (see OP) also contains cells with the word;
"nvt". Using the average function in the worksheet itself results in
the expected result: ignore those cells with nvt.
But using application.worksheetfunction.average(etc....) in vba trows
the error; "Unable to get the average property of the worksheet
funation class, error 1004". Only using numbers in each cell of the
range does give the expected result. I also tried empty cells instead
of nvt, but then the average function also results in an error.
I hope this is of any help.

Peter
From: ppeer on
p45cal, thanks very much

I tested it and it works fast and clean! It's a real turbocharger.
Indeed I want to exclude strings and blanks from the calc, although my
input cells are never blank, so no further issue here: this code does
just that.

best rgards
ppeer