Need help with nested concatenate in index match

silverback24

Board Regular
Joined
Jul 30, 2013
Messages
58
I am making a hold queue workbook and need to be able to look up the lead time based on account and order hour. I know there are lookups with two criteria but that takes too long to process for this macro. So I now have a bastardized formula where I am trying to concatenate the account number-hour ordered "900013-10" and look up the entry that is larger than this using the -1 in index match. The two entries for this account would be 900013-11 and 900013-24. Right now they are selecting the -24 or the one above that entry. Some account numbers have letters if that makes a difference.

Full formula:
=B331+INDEX('Rules Sheet'!D:D,MATCH(CONCATENATE('Hold Queue'!A331,"-",'Hold Queue'!C331),'Rules Sheet'!C:C,-1))+VLOOKUP(WEEKDAY('Hold Queue'!B331,1),'Rules Sheet'!$I$1:$J$8,2,FALSE)+VLOOKUP(WEEKDAY(B331+INDEX('Rules Sheet'!D:D,MATCH(CONCATENATE('Hold Queue'!A331,"-",'Hold Queue'!C331),'Rules Sheet'!C:C,-1))+VLOOKUP(WEEKDAY('Hold Queue'!B331,1),'Rules Sheet'!$I$1:$J$8,2,FALSE),1),'Rules Sheet'!$I$10:$J$17,2,FALSE)+IF(ISNUMBER(H331),H331,0)

=(order date) + (process time) + (additional process time if ordered fri or sat) + (additional process time if calculated ship date is on weekend) + (special circumstance process time changes)

Thanks in advance!
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
As a follow up, the results are inconsistent due to the lookup always finding the -24 variant of any combo. Is there a better way to do this? I need to be able to have separate process times for certain accounts depending on when the order was placed. Our database cannot handle this so I am looking for excel workarounds.
 
Upvote 0
Following up a second time. I found out what the issue was. I replaced "-" in side the concatenate with IF(len('Hold Queue'!C331)=1,"-0","-") because there needed to be two numbers after the hyphen for the formula to work properly. Frustratingly simple answer.
 
Upvote 0

Forum statistics

Threads
1,224,828
Messages
6,181,210
Members
453,023
Latest member
alabaz

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