dependent cells

mdkusername

New Member
Joined
Dec 9, 2015
Messages
34
I have a set of primary codes that are associated with multiple secondary codes (secondary code groups). Each primary code is associated with a secondary code group, some primary codes have the same secondary groups.
The primary codes are listed with their secondary code groups.

I would like (primary matched secondary) to make a drop down list of primary codes. When the primary code is selected I would the cells to populate with the codes that are in the secondary code group associated with the selected primary code
 

Attachments

  • XL.png
    XL.png
    149.2 KB · Views: 12
  • xl-2 (2).png
    xl-2 (2).png
    143.1 KB · Views: 12
  • xl-3.png
    xl-3.png
    137.3 KB · Views: 12

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.
I think you missed to point out which part of secondary code to choose.

If, for example, you choose "001 Description" as "Primary code & description" then there are too many options left for the "secondary code".

Could you clarify?
 
Upvote 0
In column A are listed the primary code and description and the associated secondary code group. The secondary code group is defined in the secondary group data sheet. What I am trying to do on sheet "primary matched secondary" is when I chose a primary code from the drop down the individual items in the associated secondary code group are displayed. So if I chose "001 description" from the drop down then the secondary code and the secondary code group items corresponding to the code group 1 would be dispalyed in the 2 columns below.
XL ex.png

xl-2.png
 
Upvote 0
Give this a try:

These are the sheets:
1726562772202.png


1726562874948.png


1726562972397.png


Set up a Data Validation:
1726563325992.png


Enter formulas:
Excel Formula:
A3 = INDEX(SGD!$1:$1048576;ROW()-1;XMATCH(XLOOKUP($A$2;PCD!$A:$A;PCD!$B:$B;"";0);SGD!$1:$1;0;1))
Excel Formula:
B3 = INDEX(SGD!$1:$1048576;ROW()-1;XMATCH(XLOOKUP($A$2;PCD!$A:$A;PCD!$B:$B;"";0);SGD!$1:$1;0;1)+1)

The result:
1726563458573.png


Please let me know if this works for you.
 
Upvote 0
Give this a try:

These are the sheets:
View attachment 116931

View attachment 116932

View attachment 116934

Set up a Data Validation:
View attachment 116935

Enter formulas:
Excel Formula:
A3 = INDEX(SGD!$1:$1048576;ROW()-1;XMATCH(XLOOKUP($A$2;PCD!$A:$A;PCD!$B:$B;"";0);SGD!$1:$1;0;1))
Excel Formula:
B3 = INDEX(SGD!$1:$1048576;ROW()-1;XMATCH(XLOOKUP($A$2;PCD!$A:$A;PCD!$B:$B;"";0);SGD!$1:$1;0;1)+1)

The result:
View attachment 116937

Please let me know if this works for you.
Tried to troubleshoot formula but cannot make it work. Thanks for taking the time and attention.
 

Attachments

  • PC des 2024-09-17 101047.png
    PC des 2024-09-17 101047.png
    30.2 KB · Views: 4
  • SGD 2024-09-17 101611.png
    SGD 2024-09-17 101611.png
    22.8 KB · Views: 4
  • PMS 2024-09-17 101659.png
    PMS 2024-09-17 101659.png
    70.9 KB · Views: 4
Upvote 0
Sorry, my fault. Have been working on another computer with different regional settings.
Replace all semicolons with commas or copy and paste:

Excel Formula:
A3 = INDEX(SGD!$1:$1048576,ROW()-1,XMATCH(XLOOKUP($A$2,PCD!$A:$A,PCD!$B:$B,"",0),SGD!$1:$1,0,1))
Excel Formula:
B3 = INDEX(SGD!$1:$1048576,ROW()-1,XMATCH(XLOOKUP($A$2,PCD!$A:$A,PCD!$B:$B,"",0),SGD!$1:$1,0,1)+1)

Keep in mind that I named my worksheets differently.
 
Upvote 0

Forum statistics

Threads
1,221,531
Messages
6,160,366
Members
451,642
Latest member
mirofa

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