Hi Everyone -
I have three sets of data.
One is organized like this:
Table1
[TABLE="width: 500"]
<tbody>[TR]
[TD]Product ID[/TD]
[TD]Start Date[/TD]
[TD]Code[/TD]
[/TR]
[TR]
[TD]121[/TD]
[TD]4/05/2018[/TD]
[TD]X[/TD]
[/TR]
[TR]
[TD]131[/TD]
[TD]4/05/2018[/TD]
[TD]V[/TD]
[/TR]
[TR]
[TD]121[/TD]
[TD]4/20/2018[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Another like this:
Table2
[TABLE="width: 500"]
<tbody>[TR]
[TD]Product ID[/TD]
[TD]Buy Date[/TD]
[/TR]
[TR]
[TD]121[/TD]
[TD]4/06/2018[/TD]
[/TR]
[TR]
[TD]131[/TD]
[TD]4/06/2018[/TD]
[/TR]
[TR]
[TD]121[/TD]
[TD]4/07/2018[/TD]
[/TR]
[TR]
[TD]121[/TD]
[TD]4/22/2018[/TD]
[/TR]
</tbody>[/TABLE]
And a third like this:
Table3
[TABLE="width: 500"]
<tbody>[TR]
[TD]Product ID[/TD]
[TD]Start Date[/TD]
[TD]Buy Date 1[/TD]
[TD]Buy Date 2 (if applicable)[/TD]
[TD]Buy date 3 (if applicable)[/TD]
[/TR]
[TR]
[TD]121[/TD]
[TD]4/05/2018[/TD]
[TD]4/6/2018[/TD]
[TD]4/7/2018[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]121[/TD]
[TD]4/20/2018[/TD]
[TD]4/22/2018[/TD]
[TD]null[/TD]
[TD]null[/TD]
[/TR]
[TR]
[TD]131[/TD]
[TD]4/05/2018[/TD]
[TD]4/06/2018[/TD]
[TD]null[/TD]
[TD]null[/TD]
[/TR]
</tbody>[/TABLE]
I need to take the values in Table 1 and just pull in the "bought dates" in Table2 that come BEFORE the next "start date" in table2. They also need to be associated with the product ID.
In other words, I would pull the bought date into the row with the product id and start date IF the product id matches AND start date is BEFORE the next start date.
Then, I need to compare that table with a table that is already set up like that (from external source) to check which dates we do not have recorded. Please help, other notes: I really don't want to vlookup everything or index/match so I'm asking for something other than that level of solution please
I have three sets of data.
One is organized like this:
Table1
[TABLE="width: 500"]
<tbody>[TR]
[TD]Product ID[/TD]
[TD]Start Date[/TD]
[TD]Code[/TD]
[/TR]
[TR]
[TD]121[/TD]
[TD]4/05/2018[/TD]
[TD]X[/TD]
[/TR]
[TR]
[TD]131[/TD]
[TD]4/05/2018[/TD]
[TD]V[/TD]
[/TR]
[TR]
[TD]121[/TD]
[TD]4/20/2018[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Another like this:
Table2
[TABLE="width: 500"]
<tbody>[TR]
[TD]Product ID[/TD]
[TD]Buy Date[/TD]
[/TR]
[TR]
[TD]121[/TD]
[TD]4/06/2018[/TD]
[/TR]
[TR]
[TD]131[/TD]
[TD]4/06/2018[/TD]
[/TR]
[TR]
[TD]121[/TD]
[TD]4/07/2018[/TD]
[/TR]
[TR]
[TD]121[/TD]
[TD]4/22/2018[/TD]
[/TR]
</tbody>[/TABLE]
And a third like this:
Table3
[TABLE="width: 500"]
<tbody>[TR]
[TD]Product ID[/TD]
[TD]Start Date[/TD]
[TD]Buy Date 1[/TD]
[TD]Buy Date 2 (if applicable)[/TD]
[TD]Buy date 3 (if applicable)[/TD]
[/TR]
[TR]
[TD]121[/TD]
[TD]4/05/2018[/TD]
[TD]4/6/2018[/TD]
[TD]4/7/2018[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]121[/TD]
[TD]4/20/2018[/TD]
[TD]4/22/2018[/TD]
[TD]null[/TD]
[TD]null[/TD]
[/TR]
[TR]
[TD]131[/TD]
[TD]4/05/2018[/TD]
[TD]4/06/2018[/TD]
[TD]null[/TD]
[TD]null[/TD]
[/TR]
</tbody>[/TABLE]
I need to take the values in Table 1 and just pull in the "bought dates" in Table2 that come BEFORE the next "start date" in table2. They also need to be associated with the product ID.
In other words, I would pull the bought date into the row with the product id and start date IF the product id matches AND start date is BEFORE the next start date.
Then, I need to compare that table with a table that is already set up like that (from external source) to check which dates we do not have recorded. Please help, other notes: I really don't want to vlookup everything or index/match so I'm asking for something other than that level of solution please