+ Reply to Thread
Results 1 to 3 of 3

count cells if ADJACENT row values meet criteria

Hybrid View

  1. #1
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: count cells if ADJACENT row values meet criteria

    if your DateTime data are in cells A2:A24, and Value data are in B2:B24, use (in any other cell) the following ARRAY formula (see signature) to get the count like you desire:

    =SUM(--(FREQUENCY(IF($B$2:$B$24>1000,ROW($B$2:$B$24)-MIN(ROW($B$2:$B$24))+1),IF($B$2:$B$24<=1000,ROW($B$2:$B$24)-MIN(ROW($B$2:$B$24))+1))=4))
    or regular formula:

    =SUM(--(FREQUENCY(($B$2:$B$24>1000)*(ROW($B$2:$B$24)-MIN(ROW($B$2:$B$24))+1),($B$2:$B$24<=1000)*(ROW($B$2:$B$24)-MIN(ROW($B$2:$B$24))+1))=4))
    Last edited by icestationzbra; 12-10-2012 at 01:31 AM. Reason: fixed the formula
    - i.s.z -
    CSE, aka Array aka { }, formulae are confirmed with CONTROL+SHIFT+ENTER.
    Replace commas ( , ) with semicolons ( ; ) in formulae, if your locale setting demands.
    All good ideas are courtesy resources from this forum as well as others around the web.
    - e.o.m -

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1