+ Reply to Thread
Results 1 to 5 of 5

CountIf using four fields

  1. #1
    Registered User
    Join Date
    12-07-2012
    Location
    london, england
    MS-Off Ver
    Excel 2003
    Posts
    43

    CountIf using four fields

    Hi All,

    I have four columns.. Column A, B & C contain positive and negative numbers. Column D is a helper column with Values 1 & 2.

    Every time there is a 2 in column D, I want to calculate in column E, no. of times there is a ">0" number in all Column A, B & C in the same row, for the range of numbers till the next 2 appears in column B.

    The example below should help to understand what I mean.

    A | B | C | D | E (desired result)
    7 | 8 | 3 | 2 | 1
    9 | 0 | 4 | 1 |
    4 | 0 | 7 | 2 | 0
    -3 | 0 0 | 1 |
    2 | 0 | 2 | 1 |
    -8 | 0 | 0 | 1 |
    -8 | 0 | 1 | 1 |
    3 | 6 | 8 | 2 | 1
    -6 | 7 | 6 | 1 |
    6 | 1 | 2 | 2 | 3
    7 | 0 | 3 | 1 |
    8 | 5 | 4 | 1 |
    5 | 2 | 3 | 1 |
    4 | 9 | 7 | 2 | 2
    3 | 0 |5 | 1 |
    5 | 2 | 1 | 1 |


    Hoping some can help me quick!!

    Much appreciated!!

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: CountIf using four fields

    HI DexterG,

    no. of times there is a ">0"
    You are counting Zeros or numbers greater than zeros ?
    check the attachment :-
    number greater than zero.xlsx

    Regards,
    DILIPandey
    <click on below * if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), dilipandey@gmail.com

  3. #3
    Registered User
    Join Date
    12-07-2012
    Location
    london, england
    MS-Off Ver
    Excel 2003
    Posts
    43

    Re: CountIf using four fields

    Hi Dilipandey,

    Every time there is a 2 in column D, I want to calculate in column E, no. of times there is a ">0" number in all Column A, B & C at the same time i.e in the same row, for the range of numbers till the next 2 appears in column B.

    The file I've attached might help you to understand better what I mean.

    Thank you so much for the quick reply!
    Attached Files Attached Files

  4. #4
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: CountIf using four fields

    check the attachment... what if one number in a set (set of 3 numbers) is zero or -ve ?
    Number greater than zero(1).xlsx


    Regards,
    DILIPandey
    <click on below * if this helps>

  5. #5
    Registered User
    Join Date
    12-07-2012
    Location
    london, england
    MS-Off Ver
    Excel 2003
    Posts
    43

    Re: CountIf using four fields

    Quote Originally Posted by dilipandey View Post
    check the attachment... what if one number in a set (set of 3 numbers) is zero or -ve ?
    Attachment 212193


    Regards,
    DILIPandey
    <click on below * if this helps>
    You are right, I've Attached a new sheet with corrections.
    Sorry that was a mistake on my part.

    Thank you very much.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    12-07-2012
    Location
    london, england
    MS-Off Ver
    Excel 2003
    Posts
    43

    Re: CountIf using four fields

    Copy of Number greater than zero(1).xlsx
    Quote Originally Posted by dilipandey View Post
    check the attachment... what if one number in a set (set of 3 numbers) is zero or -ve ?
    Attachment 212193


    Regards,
    DILIPandey
    <click on below * if this helps>
    You are right, I've Attached a new sheet with corrections.
    Sorry that was a mistake on my part.

    Thank you very much.
    Last edited by DexterG; 02-05-2013 at 08:33 AM.

+ 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