Writeing a formula for

J

jay.gregerson

I need to write a formula for finding a % of a series of rows. However some
of the rows are not applicable.
Examle of what I am trying to make happen:

a | b | c | d
1 | 0 | 1 | 1 = 75%
| 1 | | = 100%
0 | 1 | | = 50%

The blank cells dont have a value so I dont want them to reflect in the
result. I dont know how to write a formula to only use cells that have a
value.

What i have now is (a1:a4)/?? What do I divide it by.

Please reply to
[email protected]
 
B

Bob Phillips

=AVERAGE(IF(A1:D1<>"",A1:D1))

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"[email protected]"
 
P

Paul Mathews

A non-array formula solution for the items in row 1 might be:

=COUNTIF(A1:D1,">0")/COUNT(A1:D1)

(copy this to all rows with data; note that any rows with no data at all
will generate a divide by zero error).
 
Top