View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Find the next date for a product

Try this:

=IF(COUNTIF(Sheet2!A$2:A$15,A2),IF(VLOOKUP(A2,Shee t2!A$2:B$15,2,0)B2,VLOOKUP(A2,Sheet2!A$2:B$15,2,0 ),""),"")

--
Biff
Microsoft Excel MVP


"Algeraist" wrote in message
...
Hello,
I have an excel document with two sheets, sheet1 contains a list of
product
codes in column A and a date next to each in column B. Sheet2 is almost
the
same but with different dates and some products aren't on the list.

For each product code - In column C on sheet one I want to find the same
product code from sheet2 and pick up the date next to it if it is greater
than the date in column B. If there is no match I was going to leave the
cell
blank.

I've tried index/match with if statements and lookups but with no success

Any ideas.... Thanks in advance