+ Reply to Thread
Results 1 to 3 of 3

How to count cells in a column those are matching a certain criteria?

  1. #1
    Registered User
    Join Date
    06-02-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    2

    How to count cells in a column those are matching a certain criteria?

    Hi friends,

    I require to write a formula on excel which I tried, but no luck and need the help from this great forum. Please see the expression stated below:

    (1) COUNT THE NUMBER OF "CELLS" IN A COLUMN (SAY "B"), CONTAINING NUMERICAL VALUES, THOSE ARE GREATER THAN (IN VALUES) OF CELLS OF COLUMN "A" IN SUCH A MANNER >>>

    COMPARE ONLY BETWEEN - "B2" WITH "A1", "B3" WITH "A2", "B4" WITH "A3", "B5" WITH "A4" AND SO ON.........
    FOR AN EXAMPLE, IF B2>A1, B3<A2, B4>A3, B5>A4, B6<A5, B7>A6 THEN THE VALUE OF THE "RESULT" WILL BE (DISPLAYING IN CELL "C1") = 04.

    (2) SAME WAY, FORMULA TO COUNT NO. OF CELLS (COLUMN "B"), VALUES LESSER THAN COLUMN "A" (COMPARING IN SAME MANNER STATED PREVIOUSLY).

    HERE, NOTE THAT, THE "RESULT" WILL BE EXCLUDES OF THE CELLS, THOSE ARE "EMPTY" OR "VALUE=0".

    A B
    773.04 769.60
    800.55 797.65
    803.73 801.44
    801.03 797.17
    815.91 813.65
    813.82 810.10
    829.06 827.32
    830.82 826.55
    848.42 844.54
    838.24 835.98
    843.33 841.83
    836.02 833.20
    845.24 843.22
    829.30 826.90
    830.42 828.82
    820.02 817.91
    807.09 805.26
    0.00 0.00
    0.00 0.00
    0.00 0.00
    0.00 0.00
    0.00 0.00

    Thanks in advance.

    N.B. : ATTACHED PLEASE FIND THE MANUALLY COMPLETED XLS FILE FOR YOUR EASY UNDERSTANDING.

    Rgds,
    Arnab
    Attached Files Attached Files
    Last edited by live.arnab; 06-02-2013 at 11:11 AM. Reason: PLEASE FIND THE ATTACHMENT FOR ESSAY UNDERSTANDING

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

    Re: How to count cells in a column those are matching a certain criteria?

    in C2:

    =SUMPRODUCT((B3:B26>0)*(A2:A25>0)*(B3:B26>A2:A25))

    in D2:

    =SUMPRODUCT((B3:B26>0)*(A2:A25>0)*(B3:B26<A2:A25))

    observe that the ranges are staggered (offset by 1 row).

    the underlying assumption is that there will absolutely be no textual values in either of those ranges.
    Last edited by icestationzbra; 06-02-2013 at 07:58 PM. Reason: corexn
    - 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 -

  3. #3
    Registered User
    Join Date
    06-02-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: How to count cells in a column those are matching a certain criteria?

    Thanks, you are such a genius my frend!....thanks a lot. It's working fine.....cool. I would like to add few more conditions into my formula, on which I'm working now. If I fail, I'll ask your expertise again. And hope I'll continue to get your support.

    Rgds,
    Arnab

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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