G
Guy Hoffman
I have the following code:
'Average applicable cells ignoring zeros
Worksheets("Summary").Range("H5").Formula = "=Average('" &
startsheet & ":" & endsheet & "'!H5)"
The problem is that the formula as written includes zeros in the
average. I need to ignore zeros.
Some background:
This is only a portion of a subroutine
The routine then goes on to copy the newly writtem formula (note the
relative fererence) to other selected cells on the sheet "Summary"
The "startsheet" and "endsheet" strings used in the formula can change
depending on which sheets are specified by the user so I need to keep
this logic
Can anyone help we with a formula to average the range specified,
ignoring zeros?
'Average applicable cells ignoring zeros
Worksheets("Summary").Range("H5").Formula = "=Average('" &
startsheet & ":" & endsheet & "'!H5)"
The problem is that the formula as written includes zeros in the
average. I need to ignore zeros.
Some background:
This is only a portion of a subroutine
The routine then goes on to copy the newly writtem formula (note the
relative fererence) to other selected cells on the sheet "Summary"
The "startsheet" and "endsheet" strings used in the formula can change
depending on which sheets are specified by the user so I need to keep
this logic
Can anyone help we with a formula to average the range specified,
ignoring zeros?