+ Reply to Thread
Results 1 to 3 of 3

COUNTIF with two conditions

  1. #1
    Registered User
    Join Date
    09-03-2007
    Posts
    12

    COUNTIF with two conditions

    Hi,

    I've got a spreadsheet with 8 columns (A,B,C,D,E,F,G,H)
    Column A has an identifier (1,2,3,4)
    Column B has the Start Date
    Column C has the $ value
    Column D is for < 30days
    Column E is for < 60days
    Column F is for < 90days
    Column G is for >=120 days
    Cell H1 has todays date ( =today() )

    I'm getting stuck with the conditional counting..
    What I want to do is populate cells D>G with a count from Column A for each Identifier (1,2,3,4).

    Basically Columns D>G should contain:
    Count of identifier 'A' where todays date is <30 days from date in B,
    Count of identifier 'A' where todays date is <60 days from date in B,
    Count of identifier 'A' todays date is <90 days from date in B,
    Count of identifier 'A' todays date is >=120 days from date in B

    Count of identifier 'B' where todays date is <30 days from date in B,
    Count of identifier 'B' where todays date is <60 days from date in B,
    Count of identifier 'B' where todays date is <90 days from date in B,
    Count of identifier 'B' where todays date is >=120 days from date in B

    etc, etc. for all identifiers.

    Once I get this running, I will then also SUM the total for each of the results in columns D>G for each identifier. Eg. There are 10 instances of 'A' that have been running for <30days for a total of $10,000 value.


    Any help you could give for the above would be greatly appreciated..

  2. #2
    Registered User
    Join Date
    09-03-2007
    Posts
    12
    ok, I made a new column (I) which contains the result of 'current date' - 'start date'. Hopefully this will help.. My problem is with the below expression..

    Please Login or Register  to view this content.
    for some reason I always get a result of '2'
    Last edited by firebladejr; 04-24-2008 at 12:29 AM.

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464
    Quote Originally Posted by firebladejr
    Hi,

    I've got a spreadsheet with 8 columns (A,B,C,D,E,F,G,H)
    Column A has an identifier (1,2,3,4)
    Column B has the Start Date
    Column C has the $ value
    Column D is for < 30days
    Column E is for < 60days
    Column F is for < 90days
    Column G is for >=120 days
    Cell H1 has todays date ( =today() )

    I'm getting stuck with the conditional counting..
    What I want to do is populate cells D>G with a count from Column A for each Identifier (1,2,3,4).

    Basically Columns D>G should contain:
    Count of identifier 'A' where todays date is <30 days from date in B,
    Count of identifier 'A' where todays date is <60 days from date in B,
    Count of identifier 'A' todays date is <90 days from date in B,
    Count of identifier 'A' todays date is >=120 days from date in B

    Count of identifier 'B' where todays date is <30 days from date in B,
    Count of identifier 'B' where todays date is <60 days from date in B,
    Count of identifier 'B' where todays date is <90 days from date in B,
    Count of identifier 'B' where todays date is >=120 days from date in B

    etc, etc. for all identifiers.

    Once I get this running, I will then also SUM the total for each of the results in columns D>G for each identifier. Eg. There are 10 instances of 'A' that have been running for <30days for a total of $10,000 value.


    Any help you could give for the above would be greatly appreciated..
    Hi,

    I'm attaching a sample workbook which i think contains teh essence of what you're after. There appears to be a gap in the ageing periods you mention above. What about days >90 and <120. I'm assuming this is a typo and have assumed col G is for values older than 90 days.

    HTH
    Attached Files Attached Files

+ 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