VLookup and Match

awhiterussian

New Member
Joined
Jul 27, 2007
Messages
10
so here is the problem:

I have 2 spreadsheets. One is a promotion calendar that lists the dates that promotions on a certain product runs. The other is a shipment grid of shipments of that product to the customer.

I want VLookup to find the customer and the dates and then bring me back an asterisk in a separate column to show me that that certain week that product was delivered was a promotion week. The problem I have is using Vlookup to lookup 2 things at once (and if they match to the promotion calendar) and return me an asterisk.

Here is my formula now:

=IF(VLOOKUP(J2&" "&L2,'East Data'!M:AU,2,FALSE),"*",0)

J2 is the customer name
L2 is the week
"East Data" is the spreadsheet with all of the promotions and customers.

Thanks for your help in advance!
 
REAL East file with promos TEST Good 073007R1.xls
BCDE
2PromotionCalendar
3
4ConcatenationofCustomerandProductStartDateEndDate
5A&P/FOODMART00004ARIZONAICEDTEAHG01/21/0702/22/07
6A&P/FOODMART00004AXELRODCOTTAGECHEESE16OZ04/21/0705/18/07
7A&P/FOODMART00004AXELRODCOTTAGECHEESE16OZ06/09/0707/05/07
8A&P/FOODMART00004AXELRODCOTTAGECHEESE16OZ07/28/0708/23/07
9
10ShipmentCalendar
11ConcatenationofCustomerandProductShipDateCasesShippedOnPromotion?
12A&P/FOODMART00004ARIZONAICEDTEAHG01/21/0775FORMULA
13A&P/FOODMART00004CARBCOUNTDOWNHG-6CS01/07/06136
14A&P/FOODMART00004CARBCOUNTDOWNHG-6CS01/28/0651
15A&P/FOODMART00004LACTAIDFLUIDMILK32OZ-12CS01/28/06255
Sheet1


Here is an example of a spreadsheet. The problem is I have over 1000 stores and 100 products and a year and a half of dates.

i think the formula requires the "if(match(" combo to work. I am having trouble to write a logic statement that makes it search to see if the shipment date falls in between one of the promotion dates to return me an asterisk.
 
Upvote 0

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Hmm...I hate using SUMPRODUCT here, but it seems like the simplest solution:
Book1
ABCDE
1AccountProductStartDateEndDate
2KrogerMilk1/2/20071/25/2007
3Walmartyogurt2/25/20073/5/2007
4Albertsonsmilk3/15/20073/20/2007
5
6
7AccountProductCasesShippedDateFORMULA
8Krogermilk4001/10/2007*
9Walmartyogurt3504/15/2007 
Sheet1


Formula in E8:
=IF(SUMPRODUCT(--(A8=$A$2:$A$4),--(B8=$B$2:$B$4),--(D8>=$C$2:$C$4),--(D8<=$D$2:$D$4)),"*","")
 
Upvote 0

Forum statistics

Threads
1,215,745
Messages
6,126,627
Members
449,323
Latest member
Smarti1

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top