LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
Barbara Wiseman
 
Posts: n/a
Default code not unique find latest date

I have a list of codes in column K, and their dates in column N. Some of
the codes are duplicated in column K. What I would like to do is in another
column pick the code from column K, but only if it is unique, or if not only
if it has the latest date in column N of all instances of that code.



e.g.



Col K Col N other column

X123 1-Jan-2004

X126 1-Feb-2004 X126

X123 1-Dec-2005 X123



The first example is blank as it is not unique and there is another instance
with the same code, with a later date. The 3rd example is not unique, but
does have the latest date of that code. The 2nd example is a unique code.



I have got this far

=IF(COUNTIF(K:K,K6)1, ,K6)



which is the easy bit, I know. So I test for uniqueness and if the code is
unique I return the code. But how to fill in the blank to look at all the
instances of the code if it is not unique, there may be up to 2, 3 or 4
instances of some codes, and determine which has the latest date, and only
put the code in the 'other column' if it is the latest dated of all the
instances of that code?



It may not be possible, but any suggestions would be welcome. I am quite
happy to use a helper column if needed.



Thanks,

Barbara


 
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
show latest date input only Nigel Excel Discussion (Misc queries) 1 December 1st 05 11:55 AM
NETWORKDAYS - Multiple Date Selection Annabelle Excel Discussion (Misc queries) 3 October 4th 05 07:04 PM
find rows for unique data in 1 column and different data in other. Dot Majewski Excel Discussion (Misc queries) 1 January 21st 05 12:23 AM
Problem with Date format from VBA code twig Excel Discussion (Misc queries) 3 December 7th 04 06:01 PM
find date in Col A corresponding to min value in Col B gregl Excel Worksheet Functions 15 November 19th 04 04:01 AM


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

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

About Us

"It's about Microsoft Excel"