Hi All,
Hopefully the title is quite descriptive here, I'm essentially trying to do as I describe; I'm trying to do an Index Match with a few criteria, one of which is a date.
Here's an example below:
The formula will sit in an excel sheet which will be completed with the following information:
Brand - Brand A or Brand B
Product - Product A, Product B or Product C
Sale Date - Date in DD/MM/YYYY format
Using this information, I need to be able to return the document code that was valid during the specific product was sold. Every product for every brand has it's own document in roughly 1 month increments (Not always exactly a month, some run for a month and a bit or less than a month) there is only ever one document in place for each combination of brand/product/date at any one time.
My formula is it stands works but only if it's an exact date match - the formula is:
{=INDEX(M:M,MATCH(D3&E3&F3,J:J&K:K&L:L,0))}
Excuse the column references, these are aligned to my sheet but I don't have column headings on the data in thread(at the bottom of the question)
So in summary, is there a way to interrogate the below data with the data above and return a document code for the date range?
Hopefully this makes sense.
Thanks
[TABLE="width: 397"]
<tbody>[TR]
[TD]Brand[/TD]
[TD]Product[/TD]
[TD]Document used from[/TD]
[TD]Document Code[/TD]
[/TR]
[TR]
[TD]Brand A[/TD]
[TD]Product A[/TD]
[TD]01/01/1999[/TD]
[TD="align: right"]12345[/TD]
[/TR]
[TR]
[TD]Brand A[/TD]
[TD]Product B[/TD]
[TD]01/01/1999[/TD]
[TD="align: right"]12346[/TD]
[/TR]
[TR]
[TD]Brand A[/TD]
[TD]Product C[/TD]
[TD]01/01/1999[/TD]
[TD="align: right"]12347[/TD]
[/TR]
[TR]
[TD]Brand A[/TD]
[TD]Product A[/TD]
[TD]01/02/1999[/TD]
[TD="align: right"]12348[/TD]
[/TR]
[TR]
[TD]Brand A[/TD]
[TD]Product B[/TD]
[TD]01/02/1999[/TD]
[TD="align: right"]12349[/TD]
[/TR]
[TR]
[TD]Brand A[/TD]
[TD]Product C[/TD]
[TD]01/02/1999[/TD]
[TD="align: right"]12350[/TD]
[/TR]
[TR]
[TD]Brand A[/TD]
[TD]Product A[/TD]
[TD]01/03/1999[/TD]
[TD="align: right"]12351[/TD]
[/TR]
[TR]
[TD]Brand A[/TD]
[TD]Product B[/TD]
[TD]01/03/1999[/TD]
[TD="align: right"]12352[/TD]
[/TR]
[TR]
[TD]Brand A[/TD]
[TD]Product C[/TD]
[TD]01/03/1999[/TD]
[TD="align: right"]12353[/TD]
[/TR]
[TR]
[TD]Brand B[/TD]
[TD]Product A[/TD]
[TD]01/04/1999[/TD]
[TD="align: right"]12354[/TD]
[/TR]
[TR]
[TD]Brand B[/TD]
[TD]Product B[/TD]
[TD]01/04/1999[/TD]
[TD="align: right"]12355[/TD]
[/TR]
[TR]
[TD]Brand B[/TD]
[TD]Product C[/TD]
[TD]01/04/1999[/TD]
[TD="align: right"]12356[/TD]
[/TR]
[TR]
[TD]Brand B[/TD]
[TD]Product A[/TD]
[TD]01/05/1999[/TD]
[TD="align: right"]12357[/TD]
[/TR]
[TR]
[TD]Brand B[/TD]
[TD]Product B[/TD]
[TD]01/05/1999[/TD]
[TD="align: right"]12358[/TD]
[/TR]
[TR]
[TD]Brand B[/TD]
[TD]Product C[/TD]
[TD]01/05/1999[/TD]
[TD="align: right"]12359[/TD]
[/TR]
[TR]
[TD]Brand B[/TD]
[TD]Product A[/TD]
[TD]01/06/1999[/TD]
[TD="align: right"]12360[/TD]
[/TR]
[TR]
[TD]Brand B[/TD]
[TD]Product B[/TD]
[TD]01/06/1999[/TD]
[TD="align: right"]12361[/TD]
[/TR]
[TR]
[TD]Brand B[/TD]
[TD]Product C[/TD]
[TD]01/06/1999[/TD]
[TD="align: right"]12362[/TD]
[/TR]
</tbody><colgroup><col span="2"><col><col></colgroup>[/TABLE]
Hopefully the title is quite descriptive here, I'm essentially trying to do as I describe; I'm trying to do an Index Match with a few criteria, one of which is a date.
Here's an example below:
The formula will sit in an excel sheet which will be completed with the following information:
Brand - Brand A or Brand B
Product - Product A, Product B or Product C
Sale Date - Date in DD/MM/YYYY format
Using this information, I need to be able to return the document code that was valid during the specific product was sold. Every product for every brand has it's own document in roughly 1 month increments (Not always exactly a month, some run for a month and a bit or less than a month) there is only ever one document in place for each combination of brand/product/date at any one time.
My formula is it stands works but only if it's an exact date match - the formula is:
{=INDEX(M:M,MATCH(D3&E3&F3,J:J&K:K&L:L,0))}
Excuse the column references, these are aligned to my sheet but I don't have column headings on the data in thread(at the bottom of the question)
So in summary, is there a way to interrogate the below data with the data above and return a document code for the date range?
Hopefully this makes sense.
Thanks
[TABLE="width: 397"]
<tbody>[TR]
[TD]Brand[/TD]
[TD]Product[/TD]
[TD]Document used from[/TD]
[TD]Document Code[/TD]
[/TR]
[TR]
[TD]Brand A[/TD]
[TD]Product A[/TD]
[TD]01/01/1999[/TD]
[TD="align: right"]12345[/TD]
[/TR]
[TR]
[TD]Brand A[/TD]
[TD]Product B[/TD]
[TD]01/01/1999[/TD]
[TD="align: right"]12346[/TD]
[/TR]
[TR]
[TD]Brand A[/TD]
[TD]Product C[/TD]
[TD]01/01/1999[/TD]
[TD="align: right"]12347[/TD]
[/TR]
[TR]
[TD]Brand A[/TD]
[TD]Product A[/TD]
[TD]01/02/1999[/TD]
[TD="align: right"]12348[/TD]
[/TR]
[TR]
[TD]Brand A[/TD]
[TD]Product B[/TD]
[TD]01/02/1999[/TD]
[TD="align: right"]12349[/TD]
[/TR]
[TR]
[TD]Brand A[/TD]
[TD]Product C[/TD]
[TD]01/02/1999[/TD]
[TD="align: right"]12350[/TD]
[/TR]
[TR]
[TD]Brand A[/TD]
[TD]Product A[/TD]
[TD]01/03/1999[/TD]
[TD="align: right"]12351[/TD]
[/TR]
[TR]
[TD]Brand A[/TD]
[TD]Product B[/TD]
[TD]01/03/1999[/TD]
[TD="align: right"]12352[/TD]
[/TR]
[TR]
[TD]Brand A[/TD]
[TD]Product C[/TD]
[TD]01/03/1999[/TD]
[TD="align: right"]12353[/TD]
[/TR]
[TR]
[TD]Brand B[/TD]
[TD]Product A[/TD]
[TD]01/04/1999[/TD]
[TD="align: right"]12354[/TD]
[/TR]
[TR]
[TD]Brand B[/TD]
[TD]Product B[/TD]
[TD]01/04/1999[/TD]
[TD="align: right"]12355[/TD]
[/TR]
[TR]
[TD]Brand B[/TD]
[TD]Product C[/TD]
[TD]01/04/1999[/TD]
[TD="align: right"]12356[/TD]
[/TR]
[TR]
[TD]Brand B[/TD]
[TD]Product A[/TD]
[TD]01/05/1999[/TD]
[TD="align: right"]12357[/TD]
[/TR]
[TR]
[TD]Brand B[/TD]
[TD]Product B[/TD]
[TD]01/05/1999[/TD]
[TD="align: right"]12358[/TD]
[/TR]
[TR]
[TD]Brand B[/TD]
[TD]Product C[/TD]
[TD]01/05/1999[/TD]
[TD="align: right"]12359[/TD]
[/TR]
[TR]
[TD]Brand B[/TD]
[TD]Product A[/TD]
[TD]01/06/1999[/TD]
[TD="align: right"]12360[/TD]
[/TR]
[TR]
[TD]Brand B[/TD]
[TD]Product B[/TD]
[TD]01/06/1999[/TD]
[TD="align: right"]12361[/TD]
[/TR]
[TR]
[TD]Brand B[/TD]
[TD]Product C[/TD]
[TD]01/06/1999[/TD]
[TD="align: right"]12362[/TD]
[/TR]
</tbody><colgroup><col span="2"><col><col></colgroup>[/TABLE]