awhiterussian
New Member
- Joined
- Jul 27, 2007
- Messages
- 10
The concept behind it is this: The promotion calendar looks like this:
Account Product Start Date End Date
Kroger Milk 01/2/2007 01/25/2007
Walmart yogurt 02/25/2007 03/05/2007
Albertsons milk 03/15/2007 03/20/2007
Now each specific deal refers to a specific customer and product. So, i'm matching this to the shipment data that looks like this:
Account Product Cases Shipped Date
Kroger milk 400 03/25/2007
Walmart yogurt 350 04/15/2007
So what i'm trying to do is from the shipment data to look up and see if that specific product was delivered to the customer was on promotion. So i'm looking up the product and the customer, taking that shipment date and see if it falls in an interval of dates in the promotion calendar. And if the shipment date falls in that interval, then it should return an asterisk.
=IF(ISNA(MATCH(A2,$H$2:$H$476)*AND((B2>=MIN(I2)),B2<=MAX(J2))),0,"*")
where A2 is the concatenation of product and account
H2:H476 is where all my customer/product concatenations are
B2 is the shipment date
I2 is start of promotion
J2 is end of promotion
Hope thats specific enough.
Thanks! Just learning this whole logic of excel business and I appreciate your help.
Seva
Account Product Start Date End Date
Kroger Milk 01/2/2007 01/25/2007
Walmart yogurt 02/25/2007 03/05/2007
Albertsons milk 03/15/2007 03/20/2007
Now each specific deal refers to a specific customer and product. So, i'm matching this to the shipment data that looks like this:
Account Product Cases Shipped Date
Kroger milk 400 03/25/2007
Walmart yogurt 350 04/15/2007
So what i'm trying to do is from the shipment data to look up and see if that specific product was delivered to the customer was on promotion. So i'm looking up the product and the customer, taking that shipment date and see if it falls in an interval of dates in the promotion calendar. And if the shipment date falls in that interval, then it should return an asterisk.
=IF(ISNA(MATCH(A2,$H$2:$H$476)*AND((B2>=MIN(I2)),B2<=MAX(J2))),0,"*")
where A2 is the concatenation of product and account
H2:H476 is where all my customer/product concatenations are
B2 is the shipment date
I2 is start of promotion
J2 is end of promotion
Hope thats specific enough.
Thanks! Just learning this whole logic of excel business and I appreciate your help.
Seva