+ Reply to Thread
Results 1 to 8 of 8

Compare multiple dates, can enumerate cell based on most recent date

  1. #1
    Brian
    Guest

    Compare multiple dates, can enumerate cell based on most recent date

    Howdy All,

    This is what I want to do:

    I have a spreadsheet with 4 dates in columns I, J, K, and L starting in row
    3.

    In the corresponding columns of row 1, i want to count the number of times
    each column contains the most recent date.

    Example:

    I3 = 1/1/2000, J3 = 2/2/2001, K3 = 3/3/2002, L3 = 4/4/2003

    L3 would now equal 1.

    Then next time column L contains the most recent date, L3 would enumerate
    and equal 2, etc.

    Any ideas?

    Thanks,
    Brian



  2. #2
    Pete_UK
    Guest

    Re: Compare multiple dates, can enumerate cell based on most recent date

    Try something like this in cell I1:

    =COUNTIF(I3:I100,MAX($I$3:$L$3))

    then copy to cells J1, K1 and L1. This assumes you will have up to 100
    items in each column - adjust to suit.

    Hope this helps.

    Pete


  3. #3
    Biff
    Guest

    Re: Compare multiple dates, can enumerate cell based on most recent date

    Hi!

    If I understand correctly......

    Enter this formula in I1 and copy across to L1:

    =SUMPRODUCT(--(I3:I7=SUBTOTAL(4,OFFSET($I3:$L7,ROW(I3:L7)-ROW(I3:L3),,1))))

    Adjust ranges to suit.

    Biff

    "Brian" <[email protected]> wrote in message
    news:%[email protected]...
    > Howdy All,
    >
    > This is what I want to do:
    >
    > I have a spreadsheet with 4 dates in columns I, J, K, and L starting in
    > row
    > 3.
    >
    > In the corresponding columns of row 1, i want to count the number of times
    > each column contains the most recent date.
    >
    > Example:
    >
    > I3 = 1/1/2000, J3 = 2/2/2001, K3 = 3/3/2002, L3 = 4/4/2003
    >
    > L3 would now equal 1.
    >
    > Then next time column L contains the most recent date, L3 would enumerate
    > and equal 2, etc.
    >
    > Any ideas?
    >
    > Thanks,
    > Brian
    >
    >




  4. #4
    Brian
    Guest

    Re: Compare multiple dates, can enumerate cell based on most recent date

    Thanks Pete.

    But, I'm not sure that this is doing what I want.
    I want to compare the 4 values in each successive rows against the values in
    just that row.

    Example: I3 thru L3 are compare just against I3 thru L3 and the column
    containing the most recent date enumerates, I4 thru L4 are compared just
    against I4 thru L4 and the column containing the most recent date
    enumerates.

    Is that what you formula does?

    Thanks,
    Brian

    "Pete_UK" <[email protected]> wrote in message
    news:[email protected]...
    > Try something like this in cell I1:
    >
    > =COUNTIF(I3:I100,MAX($I$3:$L$3))
    >
    > then copy to cells J1, K1 and L1. This assumes you will have up to 100
    > items in each column - adjust to suit.
    >
    > Hope this helps.
    >
    > Pete
    >




  5. #5
    Biff
    Guest

    Re: Compare multiple dates, can enumerate cell based on most recent date

    >Is that what you formula does?

    That's what my formula does. Did you try it?

    Biff

    "Brian" <[email protected]> wrote in message
    news:%[email protected]...
    > Thanks Pete.
    >
    > But, I'm not sure that this is doing what I want.
    > I want to compare the 4 values in each successive rows against the values
    > in just that row.
    >
    > Example: I3 thru L3 are compare just against I3 thru L3 and the column
    > containing the most recent date enumerates, I4 thru L4 are compared just
    > against I4 thru L4 and the column containing the most recent date
    > enumerates.
    >
    > Is that what you formula does?
    >
    > Thanks,
    > Brian
    >
    > "Pete_UK" <[email protected]> wrote in message
    > news:[email protected]...
    >> Try something like this in cell I1:
    >>
    >> =COUNTIF(I3:I100,MAX($I$3:$L$3))
    >>
    >> then copy to cells J1, K1 and L1. This assumes you will have up to 100
    >> items in each column - adjust to suit.
    >>
    >> Hope this helps.
    >>
    >> Pete
    >>

    >
    >




  6. #6
    Brian
    Guest

    Re: Compare multiple dates, can enumerate cell based on most recent date

    Biff,

    I tried your formula as well, but didn't get the results I expected.

    I adjust it, because I have 4300 values which from row 3 thru row 4303.


    "Biff" <[email protected]> wrote in message
    news:[email protected]...
    > >Is that what you formula does?

    >
    > That's what my formula does. Did you try it?
    >
    > Biff
    >
    > "Brian" <[email protected]> wrote in message
    > news:%[email protected]...
    >> Thanks Pete.
    >>
    >> But, I'm not sure that this is doing what I want.
    >> I want to compare the 4 values in each successive rows against the values
    >> in just that row.
    >>
    >> Example: I3 thru L3 are compare just against I3 thru L3 and the column
    >> containing the most recent date enumerates, I4 thru L4 are compared just
    >> against I4 thru L4 and the column containing the most recent date
    >> enumerates.
    >>
    >> Is that what you formula does?
    >>
    >> Thanks,
    >> Brian
    >>
    >> "Pete_UK" <[email protected]> wrote in message
    >> news:[email protected]...
    >>> Try something like this in cell I1:
    >>>
    >>> =COUNTIF(I3:I100,MAX($I$3:$L$3))
    >>>
    >>> then copy to cells J1, K1 and L1. This assumes you will have up to 100
    >>> items in each column - adjust to suit.
    >>>
    >>> Hope this helps.
    >>>
    >>> Pete
    >>>

    >>
    >>

    >
    >




  7. #7
    Biff
    Guest

    Re: Compare multiple dates, can enumerate cell based on most recent date

    Post the *EXACT* formula you used.

    What is your *EXACT* range, I3:L4303 ?

    Biff

    "Brian" <[email protected]> wrote in message
    news:[email protected]...
    > Biff,
    >
    > I tried your formula as well, but didn't get the results I expected.
    >
    > I adjust it, because I have 4300 values which from row 3 thru row 4303.
    >
    >
    > "Biff" <[email protected]> wrote in message
    > news:[email protected]...
    >> >Is that what you formula does?

    >>
    >> That's what my formula does. Did you try it?
    >>
    >> Biff
    >>
    >> "Brian" <[email protected]> wrote in message
    >> news:%[email protected]...
    >>> Thanks Pete.
    >>>
    >>> But, I'm not sure that this is doing what I want.
    >>> I want to compare the 4 values in each successive rows against the
    >>> values in just that row.
    >>>
    >>> Example: I3 thru L3 are compare just against I3 thru L3 and the column
    >>> containing the most recent date enumerates, I4 thru L4 are compared just
    >>> against I4 thru L4 and the column containing the most recent date
    >>> enumerates.
    >>>
    >>> Is that what you formula does?
    >>>
    >>> Thanks,
    >>> Brian
    >>>
    >>> "Pete_UK" <[email protected]> wrote in message
    >>> news:[email protected]...
    >>>> Try something like this in cell I1:
    >>>>
    >>>> =COUNTIF(I3:I100,MAX($I$3:$L$3))
    >>>>
    >>>> then copy to cells J1, K1 and L1. This assumes you will have up to 100
    >>>> items in each column - adjust to suit.
    >>>>
    >>>> Hope this helps.
    >>>>
    >>>> Pete
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >




  8. #8
    Biff
    Guest

    Re: Compare multiple dates, can enumerate cell based on most recent date

    Do you have any rows where every cell is empty?

    For example: (I understand that you're counting dates. Dates are really just
    numbers formatted to look like a date so the formula will work on the below
    example as well as a table full of dates)

    ...I..........J..........K..........L.....
    10........22........14.........57
    .........................................
    44........19........88.........77

    If so, each empty cell will evaluate to being the max value of that
    particular row. Empty cells evaluate to 0 and since there is no value higher
    than 0, 0 is the max value for that row.

    This formula will account for empty cells:

    =SUMPRODUCT(--(I3:I7<>""),--(I3:I7=SUBTOTAL(4,OFFSET($I3:$L7,ROW(I3:L7)-ROW(I3:L3),,1))))

    Biff

    "Biff" <[email protected]> wrote in message
    news:%[email protected]...
    > Post the *EXACT* formula you used.
    >
    > What is your *EXACT* range, I3:L4303 ?
    >
    > Biff
    >
    > "Brian" <[email protected]> wrote in message
    > news:[email protected]...
    >> Biff,
    >>
    >> I tried your formula as well, but didn't get the results I expected.
    >>
    >> I adjust it, because I have 4300 values which from row 3 thru row 4303.
    >>
    >>
    >> "Biff" <[email protected]> wrote in message
    >> news:[email protected]...
    >>> >Is that what you formula does?
    >>>
    >>> That's what my formula does. Did you try it?
    >>>
    >>> Biff
    >>>
    >>> "Brian" <[email protected]> wrote in message
    >>> news:%[email protected]...
    >>>> Thanks Pete.
    >>>>
    >>>> But, I'm not sure that this is doing what I want.
    >>>> I want to compare the 4 values in each successive rows against the
    >>>> values in just that row.
    >>>>
    >>>> Example: I3 thru L3 are compare just against I3 thru L3 and the column
    >>>> containing the most recent date enumerates, I4 thru L4 are compared
    >>>> just against I4 thru L4 and the column containing the most recent date
    >>>> enumerates.
    >>>>
    >>>> Is that what you formula does?
    >>>>
    >>>> Thanks,
    >>>> Brian
    >>>>
    >>>> "Pete_UK" <[email protected]> wrote in message
    >>>> news:[email protected]...
    >>>>> Try something like this in cell I1:
    >>>>>
    >>>>> =COUNTIF(I3:I100,MAX($I$3:$L$3))
    >>>>>
    >>>>> then copy to cells J1, K1 and L1. This assumes you will have up to 100
    >>>>> items in each column - adjust to suit.
    >>>>>
    >>>>> Hope this helps.
    >>>>>
    >>>>> Pete
    >>>>>
    >>>>
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >




+ 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