Countif
Use this formula but be sure to array enter using control+shift+enter when
editing
=AVERAGE(IF(L1:L90,L1:L9))
"Martin" wrote in message
...
Most of my programming experience has come from the VBE and the various
newsgroups, now I'm stuck.
I have a sheet with info in cells from a1 to n387. Daily, another 387
items
will be added, ie O1:O387, P1:P387, etc. I need to determine the number of
items on each row that are equal to or greater than 0 and then take this
number and divide by the total number of items in the row which would then
give me the %ge of results that are not negative. My idea was that in d4
and
c4 I could put a formula which could then be filled down to work for the
rest of the rows.
I managed [d4]
[d4].Formula = "=Counta(" & [l4].Address & ":" &
[iv4].End(xlToLeft).Address
& ")"
but I'm stuck on [c4] where I'm trying for something on the lines of:
[c4].Formula = "=Countif([l4]:[iv4].End(xlToLeft))=0"
but, obviously, this doesn't work. Having searched Google and tried
various
combinations of this and others (Application, WorksheetFunction), I'm
still
no further on. Can somebody please help.
Thanks
Martin
|