How can I use a VLOOKUP/INDEX to retrieve a rate based on a distribution center ID and a date?

I currentlyy have two different sheets, one in which I have my distribution center references for their ID, the start date column and end date column to set a range for a specific rate. Therefore, I can have the same ID repeatedly but with date ranges that do not overlap and a rate for each date range and ID.
In another sheet I have a shipment ID, the date that the shipment was shipped and also the distribution center ID.
I want to retrieve the Rate, first to search for the ID and then to retrieve the correct rate based on the dates.
The formula I was using was first looking at the date and then at the distribution center ID, am I on the right track?
=IF(AND([Execution Date]@row >= {Start Date Range CpL}, [Execution Date]@row <= {End Date Range CpL}), VLOOKUP([Servicing RDC (If shuttled)]@row, {Cost Per Load Range 1}, 6, false), "No Rate Found")
Answers
-
You are going to need an INDEX/COLLECT and a helper column. Are you able to provide screenshots for context?
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 67.9K Get Help
- 474 Global Discussions
- 208 Use Cases
- 517 Announcements
- 5.6K Ideas & Feature Requests
- 87 Brandfolder
- 157 Just for fun
- 84 Community Job Board
- 521 Show & Tell
- 36 Member Spotlight
- 3 SmartStories
- 309 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!