# Comparing 3 data sets

#### awhiterussian

##### New Member
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

### Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Which bit do you specifically need help with ?

i guess the part after and including *AND....

why doesn't that work?

Replies
7
Views
763
Replies
1
Views
374
Replies
0
Views
228
Replies
3
Views
537
Replies
19
Views
910

1,218,889
Messages
6,145,019
Members
450,586
Latest member
hehehihi2007

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back