ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Writeing a formula for (https://www.excelbanter.com/excel-discussion-misc-queries/93470-writeing-formula.html)

[email protected]

Writeing a formula for
 
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


Bob Phillips

Writeing a formula for
 
=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)

"
wrote in message
...
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




Paul Mathews

Writeing a formula for
 
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).

" wrote:

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



All times are GMT +1. The time now is 05:55 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com