close

If seen examples of how to do this but I'm drawing a blank.

Consider a row that has 12 columns each of which contain a date value.
Some of the dates are past, some in the future.

I two formulas: One to determine the closest future date and one to
determine the closest past date.

Can I do this with sumproduct some how?

Thanks for the help.

- JohnTry these array formulas*:

For date values in A1:A20

Closest date greater than today
B1: =MIN(IF(A1:A20gt;TODAY(),A1:A20))

Closest date less than today
C1: =MAX(IF(A1:A20lt;=TODAY(),A1:A20))

*Note: For array formulas, hold down [Ctrl] and [Shift] when you press
[Enter].Does that help?

***********
Regards,
Ron

XL2002, WinXP-Proquot;John Michlquot; wrote:

gt; If seen examples of how to do this but I'm drawing a blank.
gt;
gt; Consider a row that has 12 columns each of which contain a date value.
gt; Some of the dates are past, some in the future.
gt;
gt; I two formulas: One to determine the closest future date and one to
gt; determine the closest past date.
gt;
gt; Can I do this with sumproduct some how?
gt;
gt; Thanks for the help.
gt;
gt; - John
gt;
gt;

Ron,
That works like a charm. I dabled with both array and sumproduct
formulas but quickly created something more complex than your
relatively simple solution. Thanks a ton.

- JohnYou're very welcome, John...I'm glad you could use those formulas.

***********
Regards,
Ron

XL2002, WinXP-Proquot;John Michlquot; wrote:

gt; Ron,
gt; That works like a charm. I dabled with both array and sumproduct
gt; formulas but quickly created something more complex than your
gt; relatively simple solution. Thanks a ton.
gt;
gt; - John
gt;
gt;

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()