+ Reply to Thread
Results 1 to 2 of 2

Count cells based on date range in another column

  1. #1

    Count cells based on date range in another column

    Could someone please suggest how to use a worksheet function to count
    the number of non-empty cells in one column when the value in another
    (date) column is in a particular date range? The first column happens
    to be dates as well, but the formula would ideally work regardless of
    the counted column's data type.

    e.g.

    Given data such as:
    Column 1 Column 2
    --------- --------
    23-Oct-03 2-Jan-04
    12-Dec-03
    1-Jan-05 14-Feb-05
    31-Oct-02 12-Dec-03
    1-Jan-05 14-Feb-05
    31-Oct-02 12-Dec-03

    How do I count the non-empty cells in Column 1 when Column 2 contains a
    date in the year 2003?

    Thanks,

    Terry


  2. #2
    Peo Sjoblom
    Guest

    RE: Count cells based on date range in another column

    =SUMPRODUCT(--(YEAR(C2:C10)=2003),--(B2:B10<>""))

    where C2:C10 is column 2 and B2:B10 column 1

    Regards,

    Peo Sjoblom

    "[email protected]" wrote:

    > Could someone please suggest how to use a worksheet function to count
    > the number of non-empty cells in one column when the value in another
    > (date) column is in a particular date range? The first column happens
    > to be dates as well, but the formula would ideally work regardless of
    > the counted column's data type.
    >
    > e.g.
    >
    > Given data such as:
    > Column 1 Column 2
    > --------- --------
    > 23-Oct-03 2-Jan-04
    > 12-Dec-03
    > 1-Jan-05 14-Feb-05
    > 31-Oct-02 12-Dec-03
    > 1-Jan-05 14-Feb-05
    > 31-Oct-02 12-Dec-03
    >
    > How do I count the non-empty cells in Column 1 when Column 2 contains a
    > date in the year 2003?
    >
    > Thanks,
    >
    > Terry
    >
    >


+ 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