Spreadsheet: 126867d1320015094-index-match-for-a-lookup-involving-2-criteria-798670-index-match-oilmanlookup
Sheet: Sheet1

Workover Data |  |  |  |  |  |  | Test Data - my try |  |  | What it should be |  |  | Test Data - your try
Well | WorkoverDate | WorkoverNumber |  |  |  |  | Well | Test Date | WorkoverNumber |  |  |  | Well | Test Date | WorkoverNumber
Well 1 | 1999-12-25 00:00:00 |  |  |  |  |  | Well 1 | 1999-12-25 00:00:00 | 4b | blank |  |  | Well 1 | 1999-12-25 00:00:00
Well 1 | 2000-01-01 00:00:00 | 1a |  |  |  |  | Well 1 | 2000-01-01 00:00:00 | 4b | 1a |  |  | Well 1 | 2000-01-01 00:00:00 | 1a | 1
Well 1 | 2000-01-05 00:00:00 | 1b |  |  |  |  | Well 1 | 2000-01-02 00:00:00 | 4b | 1a |  |  | Well 1 | 2000-01-02 00:00:00 | 1a | 1
Well 1 | 2011-11-01 00:00:00 | 1c |  |  |  |  | Well 1 | 2000-01-04 00:00:00 | 4b | 1a |  |  | Well 1 | 2000-01-04 00:00:00 | 1a | 1
Well 2 | 1900-01-01 00:00:00 |  |  |  |  |  | Well 1 | 2000-01-05 00:00:00 | 4b | 1b |  |  | Well 1 | 2000-01-05 00:00:00 | 1b | 1
Well 2 | 2009-09-09 00:00:00 | 2a |  |  |  |  | Well 1 | 2009-09-09 00:00:00 | 4b | 1b |  |  | Well 1 | 2009-09-09 00:00:00 | 1b | 1
Well 2 | 2009-09-10 00:00:00 | 2b |  |  |  |  | Well 1 | 2009-09-10 00:00:00 | 4b | 1c |  |  | Well 1 | 2009-09-10 00:00:00 | 1b | 0
Well 2 | 2010-10-15 00:00:00 | 2c |  |  |  |  | Well 1 | 2011-11-01 00:00:00 | 4b | 1c |  |  | Well 1 | 2011-11-01 00:00:00 | 1c | 1
Well 3 | 1900-01-01 00:00:00 |  |  |  |  |  | Well 1 | 2011-11-01 00:00:00 | 4b | 1c |  |  | Well 1 | 2011-11-01 00:00:00 | 1c | 1
Well 3 | 2001-01-01 00:00:00 | 3a |  |  |  |  | Well 2 | 2000-01-05 00:00:00 | 4b | blank |  |  | Well 2 | 2000-01-05 00:00:00
Well 4 | 1900-01-01 00:00:00 |  |  |  |  |  | Well 2 | 2009-09-09 00:00:00 | 4b | 2a |  |  | Well 2 | 2009-09-09 00:00:00 | 2a | 1
Well 4 | 2001-01-01 00:00:00 | 4a |  |  |  |  | Well 2 | 2009-09-09 00:00:00 | 4b | 2a |  |  | Well 2 | 2009-09-09 00:00:00 | 2a | 1
Well 4 | 2009-09-09 00:00:00 | 4b |  |  |  |  | Well 2 | 2009-09-10 00:00:00 | 2b | 2b |  |  | Well 2 | 2009-09-10 00:00:00 | 2b | 1
 |  |  |  |  |  |  | Well 2 | 2009-09-11 00:00:00 | 2b | 2b |  |  | Well 2 | 2009-09-11 00:00:00 | 2b | 1
 |  |  |  |  |  |  | Well 2 | 2010-10-16 00:00:00 | 2c | 2c |  |  | Well 2 | 2010-10-16 00:00:00 | 2c | 1
 |  |  |  |  |  |  | Well 3 | 2000-01-01 00:00:00 | 4b | blank |  |  | Well 3 | 2000-01-01 00:00:00
 |  |  |  |  |  |  | Well 3 | 2001-01-01 00:00:00 | 3a | 3a |  |  | Well 3 | 2001-01-01 00:00:00 | 3a | 1
 |  |  |  |  |  |  | Well 3 | 2002-01-01 00:00:00 | 3a | 3a |  |  | Well 3 | 2002-01-01 00:00:00 | 3a | 1
 |  |  |  |  |  |  | Well 3 | 2009-09-09 00:00:00 | 3a | 3a |  |  | Well 3 | 2009-09-09 00:00:00 | 3a | 1
 |  |  |  |  |  |  | Well 4 | 2000-01-01 00:00:00 | 4b | blank |  |  | Well 4 | 2000-01-01 00:00:00
 |  |  |  |  |  |  | Well 4 | 2001-01-01 00:00:00 | 4a | 4a |  |  | Well 4 | 2001-01-01 00:00:00 | 4a | 1
 |  |  |  |  |  |  | Well 4 | 2002-01-01 00:00:00 | 4a | 4a |  |  | Well 4 | 2002-01-01 00:00:00 | 4a | 1
 |  |  |  |  |  |  | Well 4 | 2009-09-08 00:00:00 | 4a | 4a |  |  | Well 4 | 2009-09-08 00:00:00 | 4a | 1
 |  |  |  |  |  |  | Well 4 | 2009-09-09 00:00:00 | 4b | 4b |  |  | Well 4 | 2009-09-09 00:00:00 | 4b | 1
 |  |  |  |  |  |  | Well 4 | 2009-09-10 00:00:00 | 4b | 4b |  |  | Well 4 | 2009-09-10 00:00:00 | 4b | 1
 | Requirements:
 | I need to isolate the workover number from the workover data table for the corresponding well by having a formula in column J (or P for your try)
 | Condition:
 | If the test date is greater than or equal to the workover date then use the corresponding WorkoverNumber
 | Note:
 | I have put in dummy workover dates for before a well had a workover number. The date is 0 and the workover number is blank ie  =""