View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
RMF
 
Posts: n/a
Default How to count several non-adjacent cells

Thnks! Works fine!

RMF

"topola" wrote:

Hi, that's simple:

Give ranges names (InsertNameDefine)
A1:G1=years
A2:G2=values

This formula should do the work:
=SUM(IF(years=2004,IF(values<0.03,1,IF(values0.7, 1,0)),0))

This is an array formula i.e. use CTRL+SHIFT+ENTER when typed in.

--
Tomek Polak, http://vba.blog.onet.pl