Trying to Create a drop down list based on 2 columns matching

TBud1981

New Member
Joined
Oct 24, 2023
Messages
13
Office Version
  1. 365
Platform
  1. Windows
I'm not sure if it's even possible, but I'd like to have a drop down list in column Q for the matching Part #'s in Column R & BA.

the quantities in the columns now are the original pallet quantities, but I'd like a drop down list of the multiples of those quantities if we ship more than just one pallet (multiples are in AP & AS. the multiplication table for the different pallet quantities is from AI1:AY37)

so for example, if R is part # HUB284T-9[ER03] I want a drop down of the multiples of that pallet qty (shown in column AP), but if that part is not shipping and the part # shipping is HUB867T-4#R[ER03], I want a drop down of those multiples (shown in column AS).

Ship Sheets.xlsm
OPQRSTUVWXYZAAABACADAEAFAGAPASBA
1ASN#Dak#287969162224NTN Part #
2OrderLineQTYNTN Part #CPNReleaseLotPickLSNSRDPSDSPShip ToPricePOContract #Plts324448HUB529T-4[EU03]
3 486672HUB399-1#P[EU03]
4 648896HUR093-51[ER03]
5 8101120HUR093-52[ER03]
6ASN#Dak# 9721344HUR093-53[ER03]
7OrderLineQTYNTN Part #CPNReleaseLotPickLSNSRDPSDSPShip ToPricePOContract #Plts11341568HUR102-14[ER03]
8 12961792HUR122-14[ER03]
9 14582016HUR122-4[ER03]
10 16202240HUB867T-4#E[EU03]
11ASN#17822464HUB868T-4#E[EU03]
12OrderLineQTYNTN Part #CPNReleaseLotPickLSNSRDPSDSPShip ToPricePOContract #Plts19442688HUB335T-8#P[EU03]
13 21062912HUB284T-9[ER03]
14 22683136HUB867T-4#R[ER03]
15 24303360HUB867T-4[ER03]
16 25923584HUB868T-4#R[ER03]
17ASN#27543808HUB868T-4[ER03]
18OrderLineQTYNTN Part #CPNReleaseLotPickLSNSRDPSDSPShip ToPricePOContract #Plts29164032TKBA0993[ER03]
19 30784256TKBA0994[ER03]
20 32404480HUB877T-2#R[ER03]
21 34024704HUB878T-2#R[ER03]
22 35644928HUB878T-2[ER03]
23ASN#37265152
24OrderLineQTYNTN Part #CPNReleaseLotPickLSNSRDPSDSPShip ToPricePOContract #Plts38885376
25 40505600
26 42125824
27 43746048
28 45366272
29ASN#46986496
30OrderLineQTYNTN Part #CPNReleaseLotPickLSNSRDPSDSPShip ToPricePOContract #Plts48606720
31 50226944
32 51847168
33ASN#53467392
34OrderLineQTYNTN Part #CPNReleaseLotPickLSNSRDPSDSPShip ToPricePOContract #Plts55087616
356317666311162HUB284T-9[ER03]52124767AE#A210013597806508211#########10/25/2023###156707840
366305224541224HUB867T-4#R[ER03]68349631AA#A210013587266508212#########10/25/2023###158328064
376305225541224HUB868T-4#R[ER03]68346852AA#A210013574706508213#########10/25/2023###159948288
386310466426252TKBA0993[ER03]04779612AE#A210013586266508214#########10/25/2023###1
39 
Cheryl & Reno
Cell Formulas
RangeFormula
S1S1=IF(AND($D$1='https://d.docs.live.net/237f5792e79d6491/Work/Excel Spreadsheets/Requirements/[Weekly Requirements.xlsm]Weekly Requirements'!$C$33,'https://d.docs.live.net/237f5792e79d6491/Work/Excel Spreadsheets/Requirements/[Weekly Requirements.xlsm]Weekly Requirements'!$C$34>0),'https://d.docs.live.net/237f5792e79d6491/Work/Excel Spreadsheets/Requirements/[Weekly Requirements.xlsm]Weekly Requirements'!$C$34, IF(AND($D$1='https://d.docs.live.net/237f5792e79d6491/Work/Excel Spreadsheets/Requirements/[Weekly Requirements.xlsm]Weekly Requirements'!$G$33,'https://d.docs.live.net/237f5792e79d6491/Work/Excel Spreadsheets/Requirements/[Weekly Requirements.xlsm]Weekly Requirements'!$G$34>0),'https://d.docs.live.net/237f5792e79d6491/Work/Excel Spreadsheets/Requirements/[Weekly Requirements.xlsm]Weekly Requirements'!$G$34, IF(AND($D$1='https://d.docs.live.net/237f5792e79d6491/Work/Excel Spreadsheets/Requirements/[Weekly Requirements.xlsm]Weekly Requirements'!$K$33,'https://d.docs.live.net/237f5792e79d6491/Work/Excel Spreadsheets/Requirements/[Weekly Requirements.xlsm]Weekly Requirements'!$K$34>0),'https://d.docs.live.net/237f5792e79d6491/Work/Excel Spreadsheets/Requirements/[Weekly Requirements.xlsm]Weekly Requirements'!$K$34, IF(AND($D$1='https://d.docs.live.net/237f5792e79d6491/Work/Excel Spreadsheets/Requirements/[Weekly Requirements.xlsm]Weekly Requirements'!$O$33,'https://d.docs.live.net/237f5792e79d6491/Work/Excel Spreadsheets/Requirements/[Weekly Requirements.xlsm]Weekly Requirements'!$O$34>0),'https://d.docs.live.net/237f5792e79d6491/Work/Excel Spreadsheets/Requirements/[Weekly Requirements.xlsm]Weekly Requirements'!$O$34, IF(AND($D$1='https://d.docs.live.net/237f5792e79d6491/Work/Excel Spreadsheets/Requirements/[Weekly Requirements.xlsm]Weekly Requirements'!$S$33,'https://d.docs.live.net/237f5792e79d6491/Work/Excel Spreadsheets/Requirements/[Weekly Requirements.xlsm]Weekly Requirements'!$S$34>0),'https://d.docs.live.net/237f5792e79d6491/Work/Excel Spreadsheets/Requirements/[Weekly Requirements.xlsm]Weekly Requirements'!$S$34,"")))))
AF3:AF5,AF35:AF39,AF31:AF32,AF25:AF28,AF19:AF22,AF13:AF16,AF8:AF10AF3=IFERROR(SUM(Q3/INDEX(BC:BC,MATCH(R3,BA:BA,0))),"")
S6S6=IF(AND($D$1='https://d.docs.live.net/237f5792e79d6491/Work/Excel Spreadsheets/Requirements/[Weekly Requirements.xlsm]Weekly Requirements'!$C$37,'https://d.docs.live.net/237f5792e79d6491/Work/Excel Spreadsheets/Requirements/[Weekly Requirements.xlsm]Weekly Requirements'!$C$38>0),'https://d.docs.live.net/237f5792e79d6491/Work/Excel Spreadsheets/Requirements/[Weekly Requirements.xlsm]Weekly Requirements'!$C$38, IF(AND($D$1='https://d.docs.live.net/237f5792e79d6491/Work/Excel Spreadsheets/Requirements/[Weekly Requirements.xlsm]Weekly Requirements'!$G$37,'https://d.docs.live.net/237f5792e79d6491/Work/Excel Spreadsheets/Requirements/[Weekly Requirements.xlsm]Weekly Requirements'!$G$38>0),'https://d.docs.live.net/237f5792e79d6491/Work/Excel Spreadsheets/Requirements/[Weekly Requirements.xlsm]Weekly Requirements'!$G$38, IF(AND($D$1='https://d.docs.live.net/237f5792e79d6491/Work/Excel Spreadsheets/Requirements/[Weekly Requirements.xlsm]Weekly Requirements'!$K$37,'https://d.docs.live.net/237f5792e79d6491/Work/Excel Spreadsheets/Requirements/[Weekly Requirements.xlsm]Weekly Requirements'!$K$38>0),'https://d.docs.live.net/237f5792e79d6491/Work/Excel Spreadsheets/Requirements/[Weekly Requirements.xlsm]Weekly Requirements'!$K$38, IF(AND($D$1='https://d.docs.live.net/237f5792e79d6491/Work/Excel Spreadsheets/Requirements/[Weekly Requirements.xlsm]Weekly Requirements'!$O$37,'https://d.docs.live.net/237f5792e79d6491/Work/Excel Spreadsheets/Requirements/[Weekly Requirements.xlsm]Weekly Requirements'!$O$38>0),'https://d.docs.live.net/237f5792e79d6491/Work/Excel Spreadsheets/Requirements/[Weekly Requirements.xlsm]Weekly Requirements'!$O$38, IF(AND($D$1='https://d.docs.live.net/237f5792e79d6491/Work/Excel Spreadsheets/Requirements/[Weekly Requirements.xlsm]Weekly Requirements'!$S$37,'https://d.docs.live.net/237f5792e79d6491/Work/Excel Spreadsheets/Requirements/[Weekly Requirements.xlsm]Weekly Requirements'!$S$38>0),'https://d.docs.live.net/237f5792e79d6491/Work/Excel Spreadsheets/Requirements/[Weekly Requirements.xlsm]Weekly Requirements'!$S$38,"")))))
Cells with Data Validation
CellAllowCriteria
Q13:Q16List=$AK$1:$AK$37
Q19:Q22List=$AK$1:$AK$37
Q3:Q5List=$AS$1:$AS$37
Q31List=$AM$1:$AM$37
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
let me rephrase what you want to achieve.
when the user enters a part number in cell Rx, then the dropdown in cell Qx has to show the multiples of a pallet quantity.

There are different pallet configurations (listed in columns AI:AY, so part numbers are related to these columns.


What I do not understand is how the partnumber is related to a column. You mention # HUB284T-9[ER03] is related to column AP and HUB867T-4#R[ER03] is related to column AS.

Where is this link? How can a macro decide which column to load in the dropdown list in cell Qx?
 
Upvote 0
all the part numbers from column R are related to the same column (BA).

so if a user enters a part number in R...and it matches BA, I want that specific part number's multiples to only show as a drop down.

ie: user enters HUB284T-9[ER03] in column R, and it matches the part number in BA, I want a drop down of only column AP

or user enters HUB867T-4#R[ER03] in column R, and it matches the part number in BA, I want a drop down of only column AS

the only way that I've been thinking about this working is have a column of all the part number qty's with a separator between them like this:

162
324
486
-----
224
448
672

for all the column Q cells which need that input...and just scroll through them until I get the correct number I need
 
Upvote 0
It still is no clear. you write:
ie: user enters HUB284T-9[ER03] in column R, and it matches the part number in BA, I want a drop down of only column AP

or user enters HUB867T-4#R[ER03] in column R, and it matches the part number in BA, I want a drop down of only column AS

So both part numbers appear in BA, but one gets it quantity from AP, the other from AS. Why? How can a formula decide?

It could be possible to add column BB in which for each partnumber it states which column to use. Then it will be very simple to achieve your goal.
1700140218076.png
 
Upvote 0
the part numbers that are matching from column R and BA, it would take those matches and use the specific column based on that part number.
like I said...I don't know if that would be even possible as this seems to be pretty complex.

how would I achieve this based on the pallet column being in BB?
 
Upvote 0
By using =INDIRECT() in the source box for the validation list

The formula would be something like
=INDIRECT(XLOOKUP(R2,BA2:BA20,BB2:BB20)&"2:"&XLOOKUP(R2,BA2:BA20,BB2:BB20)&"17")

simplified spreadsheet:
1700218343009.png


What this formula does is the following (Let's look at cell Q2 in the sheet above):
with INDIRECT() you create an address (range)
Starting with the XLOOKUP : it looks up the value of R2 (hub2) in the column BA. When it finds it it takes the value of the same row from column BB, which in this case is 'as'
The '&' in the formula stitch the components together. So the formula for Q2 becomes
=INDIRECT(as2:as17)
So excel interprets that as the range for validation is AS2:AS17

For your case of course you need to adjust the row numbers in the formula.

You can make the formula more efficient by using the LET() function. This is because the formula now looks up the value twice. The LET() function lets you give a name to a subfunction, so you can use this name in the rest of the formula, not having o repeat the sub function.

=LET(Pal,XLOOKUP(R2,BA2:BA20,BB2:BB20),INDIRECT(Pal&"2:"&Pal&"17"))

What it says is: Let 'Pal' be 'XLOOKUP(R2,BA2:BA20,BB2:BB20)', then carry out the calculation of 'INDIRECT(Pal&"2:"&Pal&"17")'

This approach is super flexible, because you can have more pallet number columns such as AP and AS, and just refer to these in column BB for the appropriate part numbers in column BA
 
Upvote 0
Solution

Forum statistics

Threads
1,215,103
Messages
6,123,110
Members
449,096
Latest member
provoking

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