> Range("HA18").Value = Application.Average(Range("C18:AG18")).Value
use
> Range("HA18").Value = Application.Average(Range("C18:AG18"))
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"Carlee" <(E-Mail Removed)> wrote in message
news:3A7C19E5-0863-4966-9F16-(E-Mail Removed)...
> Hi,
> I am trying to average a row of data using VBA. The catch is that the row
> may or may not contain blanks, and as such, i would like the averge
> calculation to skip blank values in the calculation. This is what i have
> tried, but it hasn't worked
>
> Range("HA18").Value = Application.Average(Range("C18:AG18")).Value
>
> Can you help me out?
> --
> Carlee