Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
John Michl
 
Posts: n/a
Default Find minimum value greater than a particular value

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.

- John

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre
 
Posts: n/a
Default Find minimum value greater than a particular value

Try these array formulas*:

For date values in A1:A20

Closest date greater than today
B1: =MIN(IF(A1:A20TODAY(),A1:A20))

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

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


Does that help?

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

XL2002, WinXP-Pro


"John Michl" wrote:

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.

- John


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
John Michl
 
Posts: n/a
Default Find minimum value greater than a particular value

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.

- John

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre
 
Posts: n/a
Default Find minimum value greater than a particular value

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

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

XL2002, WinXP-Pro


"John Michl" wrote:

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.

- John


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
find first value in a row with value greater than 0 C-A Excel Discussion (Misc queries) 7 April 11th 06 09:02 PM
Trapping a NO FIND after a find Alan Excel Discussion (Misc queries) 2 August 31st 05 01:28 PM
Find last occurance of text in range farutherford Excel Worksheet Functions 5 August 30th 05 02:00 AM
Formula for placings, using 4 times and greater than minimum time handers Excel Worksheet Functions 2 May 12th 05 08:00 PM
Excel has a "Find Next" command but no "Find Previous" command. Michael Fitzpatrick Excel Discussion (Misc queries) 2 January 10th 05 11:45 PM


All times are GMT +1. The time now is 06:07 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"