PDA

View Full Version : Counting Columns of range having value greater then Zero



princ_wns
06-11-2012, 06:52 PM
Hi All,


I Have a range of 12 columns, Now i want to count how many columns have value which is greater then Zero because all cells contain zero as their default Value. Cells will consist only numeric value either Zero or Greater then Zero.



Regards And Thanks

NBVC
06-11-2012, 07:16 PM
Are you asking to count how many >0 an a row per row basis for the 12 columns?

Like: =COUNTIF(A1:L1,">0")

or in all 12 columns how many have numbers greater than 0?

Like: =SUMPRODUCT(--(MMULT(--TRANSPOSE((A1:L25)>0),ROW(A1:L25)^0)>0)) confirmed with CTRL+SHIFT+ENTER not just ENTER, where A1:L25 is the whole range of 12 columns. This counts number of columns containing at least 1 non-zero value.