Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Find the three nearest dates
I have a table that contains names in b3:b19, and corresponding dates in
c3:c19. These dates are calculated, and change on a quarterly basis, and there are often duplicate dates. The table is sorted by the names in column B. |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Find the three nearest dates
Hi,
This may be too simple, but what about temporarily sorting the data by the date column. That would give you the three names at the top of the names list. Then sort again by name to restore the data as it was. Otherwise: If your three cells that display the upcoming dates are in C24:C26, then in B24 enter: =INDEX($B$3:$B$19,MATCH(C24,$C$3:$C$19,0)) and copy down. Regards - Dave. |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Find the three nearest dates
Thanks, Dave, but I'm trying to put this pull this data into another file,
and would rather not sort the data. As far as the formula you supplied, if I'm reading it right, it assumes that I know what the next 3 dates are, but I don't. I just need the the next 3, whatever they are. Thanks, though, for your reply. Mary |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Find the three nearest dates
Sorry, I thought you knew the next three dates using =SMALL(C3:C19,{1;2;3}).
In this case, array entered into C24:C26 Regards - Dave |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Find the three nearest dates
I'm sorry, you were right! I wasn't thinking, I can use the array formula to
get the next three dates. But my problem is that the dates may repeat. For example, the next 3 items on my list have the due dates of 6/21, 6/28 and 6/28. So I get the 2 names fine, but instead of getting the third name, I get the second name again. I'm confusing myself. Here's a simplified version: Col A Col B Anne 7/11 Barb 7/18 Carl 6/28 Doug 7/4 Enid 6/21 Fred 8/30 Greg 6/28 I need to get a list that says "Enid: 6/21, Carl: 6/28, Greg: 6:28". (Not necessarily in that format, of course!) When I used your formula, I get "Enid: 6/21, Carl: 6/28, Carl: 6:28". Hope this is more clear, and I do thank you! |
#6
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Find the three nearest dates
Ah yes, I see that. Not sure how to proceed at present. With so many posts to
this thread, you may need to post again in a new one. Regards - Dave. "magdiego" wrote: I'm sorry, you were right! I wasn't thinking, I can use the array formula to get the next three dates. But my problem is that the dates may repeat. For example, the next 3 items on my list have the due dates of 6/21, 6/28 and 6/28. So I get the 2 names fine, but instead of getting the third name, I get the second name again. I'm confusing myself. Here's a simplified version: Col A Col B Anne 7/11 Barb 7/18 Carl 6/28 Doug 7/4 Enid 6/21 Fred 8/30 Greg 6/28 I need to get a list that says "Enid: 6/21, Carl: 6/28, Greg: 6:28". (Not necessarily in that format, of course!) When I used your formula, I get "Enid: 6/21, Carl: 6/28, Carl: 6:28". Hope this is more clear, and I do thank you! |
#7
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Find the three nearest dates
Hi, I've been thinking - yeah, I know...
In each of three cells, enter: =INDEX($B$3:$B$19,MATCH(SMALL($C$3:$C$19,1),$C$3:$ C$19,0)) =INDEX($B$3:$B$19,MATCH(SMALL($C$3:$C$19,2),$C$3:$ C$19,0)) =INDEX($B$3:$B$19,MATCH(SMALL($C$3:$C$19,3),$C$3:$ C$19,0)) It seemed to work when I tested it. Regards - Dave. |
#8
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Find the three nearest dates
This works - THANKS!
Mary |
#9
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Find the three nearest dates
You're welocme. Thanks for the feedback!
-- Biff Microsoft Excel MVP "magdiego" wrote in message ... This works - THANKS! Mary |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find the nearest Christmas to a date | Excel Worksheet Functions | |||
Find nearest value | Excel Discussion (Misc queries) | |||
find nearest help | Excel Worksheet Functions | |||
use vlookup or other to find the nearest values (<) or interpola | Excel Worksheet Functions | |||
How do I select the nearest date from a ranges of dates? | Excel Discussion (Misc queries) |