How do I create COMPLEX indirect data validation lists...

calumbus53

New Member
Joined
Feb 22, 2018
Messages
17
Hi guys, please help...

I am trying to create a series of indirect lists but only lists that link to their relative tree.

If say for example Parent "a" was selected, I would only have access to values directly linked with "a" (such as "a1.1, a1.2, a1.3, a1.4, a1.4", "a2.1, a2.2" and so on) and then on into child 2, repeating the same method. If "b" was selected, I only want to be able to select "b" related children, and then again onto the next level down.

I have managed to do this by creating lots of indirect lists but it is manual and just created over a "drag n drop" array! If the data is updated, I'm screwed!

Do you have any ideas? / Fancy help me doing it?

Below is an example of the format I am working to:

Parent Selection1 Child Selection2 Child SelectionParent1st Child2 Child
10.02.02aa2.1aa2.110a
10.03.03aa3.1aa3.1 a01a1.1
11.02.02bb2.2bb2.1 a a1.201aa1.1
a a1.3aa1.2
a a1.4aa1.3
a a1.5 aa1.4
a
a02a2.1
a a2.202aa2.1
a
a03a3.1
a a3.203aa3.1
a a3.3 aa3.2
a
a04a4.1
a a4.204aa4.1
11b
b01b1.1
b b1.201bb1.1
b
b02b2.1
bb2.202bb2.1
b b2.3 bb2.2
b
b03b3.1
b b3.203bb3.1

<tbody>
</tbody><colgroup><col><col><col span="2"><col><col><col><col><col><col><col></colgroup>
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Is it your intention to select 3 values from one of the sets of 3, validation lists values, based on their Interdependence as shown on the Table, and then return the column value as shown below as "Results".

ResultsVal1Val2Val3
10.02.02aa2.1aa2.1
10.03.03aa3.1aa3.1
11.02.02bb2.2bb2.1
<colgroup><col width="90" style="width: 68pt; mso-width-source: userset; mso-width-alt: 3214;"> <col width="59" style="width: 44pt; mso-width-source: userset; mso-width-alt: 2104;"> <col width="62" style="width: 47pt; mso-width-source: userset; mso-width-alt: 2218;"> <col width="66" style="width: 49pt; mso-width-source: userset; mso-width-alt: 2332;"> <tbody> </tbody>

The problem I have with this is that values "a2.1" and "a3.1" do not have a value in the column "Child 2",
and the table itself is not particularly user friendly.

Please explain further !!
Regrds Mick
 
Upvote 0
Hi Mick,

Thank you for your reply.

I knew this would be very difficult to explain.

I need to be able to select dependencies based on the other selected.


For example:

If I was working with say an car manufacturer.

They have a number of main departments (the "chief"), 2 of which would be Chassis and Powertrain. If you select "Chassis" (as the "chief"), you would have a number of "PMT" groups underneath ("Subframes", "Suspension Systems", "Steering" - to name a few) and then likewise for "Powertrain" ("Engines", "Driveline System" etc) these are what are know as the "PMT's" and then under EACH of these there are "Commodity Groups", which are then above the "Commodities" themselves! - this is because the car is made up of THOUSANDS of commodities and systems.

To look these commodities up independently I need to create a list that is based on the previous selection, eg. "POWERTRAIN > ENGINES > EVAPORATIVE EMISSIONS > VENTING DEVICES AND VALVES" (if I selected "CHASSIS" @ the chief level, I wouldn't be able to choose from the "ENGINES" menu and therefore not cascade through these.

Does this explain it any better? - I understand if not.

GetAttachmentThumbnail


Thank you for any help in advance.

Cal
 
Upvote 0
Thank you for your explanation, but in truth what I need to know are the answers to the following:-
Q(1) Are you able to accept a VBA solution.
Q(2) How many sets of (3) validation boxes do you want.
Q(4) Are you able to show the data Table in a more user friendly way i.e. with the Blank Cells showing their actual related data.
Q(5) Could the Results be Created with Comboboxes on a Userform,. That way you only need 3 comboboxes then transfer the results to the sheet

Q(6) Would there be any more columns to the table.

Regrds Mick
 
Upvote 0
Thank you for your explanation, but in truth what I need to know are the answers to the following:-
Q(1) Are you able to accept a VBA solution.
Q(2) How many sets of (3) validation boxes do you want.
Q(4) Are you able to show the data Table in a more user friendly way i.e. with the Blank Cells showing their actual related data.
Q(5) Could the Results be Created with Comboboxes on a Userform,. That way you only need 3 comboboxes then transfer the results to the sheet

Q(6) Would there be any more columns to the table.

Regrds Mick

Hi Mick,

Thank you again for your reply.

A VBA solution would be great and I am trying to generate a user form which could also deliver this information but I just do not have the knowledge and know how.

I would require 4 validation boxes: one at Tier 1, Tier 2, Tier 3, Tier 4 - I have already created validation lists with independent decencies on one an other, however because this was just essentially "auto manipulating" the data when you select a Tier, the same process could not be replicated down through rows unless many many replicas of the lookup data were created.

I would be potentially adding more columns at some point in order to include a description of some sort by the user.

I basically want to avoid a huge list at Tier 3/Tier 4 levels.
If say Tier 1 had the choice of "CAR" or "ANIMAL" then we choose animal, within the second Tier list I would want to see the likes of "Horse", "Cow", etc... NOT "Volvo", "BMW" :ROFLMAO: Tier 3 would then be "Mare", "Stallion" and then Tier 4... the colour selection or something like that.

This method is going to potentially be the process to add data to hundreds / thousands of rows!

Thank you in advance.

Cheers,

Cal
 
Upvote 0
Thanks for that Cal .
What are your thoughts on Q(4) regarding the table layout.
If you can show an example of the Table (Not a picture) with all the expected columns, and modified if possible to reflect q(4), that would be very helpful.

My idea is to show 4 ? comboboxes , whose lists will reflect the previous combobox Selections/Choice from the Table i.e. "a, a2.1,aa2.1,??"
And when all 4 boxes are complete will fill a text box with the related result i.e "10,01,01"
When completed you can decide what you want to do with the results !!
Does that sound acceptable
Regrds Mick
 
Last edited:
Upvote 0
Hi Mick,
Is this okay?

Tree 2





Tree 3





Tree 4





Result Code
Body Structures10000020.00.00
Body StructuresUnderframe010020.01.00
Body StructuresUnderframeUnderbody0120.01.01
Body StructuresUnderframeSideframe0220.01.02
Body StructuresUnderframeCross Car Parts0320.01.03
Body StructuresUnderframeRear Structure0420.01.04
Body StructuresUnderframeClosures0520.01.05
Body StructuresAdhesive020020.02.00
Body StructuresAdhesiveAdhesives0120.02.01
Body StructuresBolt-ons030020.03.00
Body StructuresBolt-onsBolt Ons Ancillaries0120.03.01
Body StructuresBolt-onsBolt Ons Front Structure0220.03.02
Body StructuresBolt-onsBolt Ons Rear Structure0320.03.03
Body StructuresBolt-onsBolt Ons Front Bumper Structure0420.03.04
Body StructuresBolt-onsBolt Ons Rear Bumper Structure0520.03.05
Body StructuresFront End Module040020.04.00
Body StructuresFront End ModuleFront End Module0120.04.01
Body StructuresFront End ModuleAir-on panels0220.04.02
Body StructuresNVH and Heat Protection050020.05.00
Body StructuresNVH and Heat ProtectionTUB Baffles0120.05.01
Body StructuresNVH and Heat ProtectionDamping Pads0220.05.02
BIW11000021.00.00
BIWBridging Structure 010021.01.00
BIWBridging Structure Rear Quarter0121.01.01
BIWBridging Structure Trunk Lid Surround 0221.01.02
BIWBridging Structure Bridging Structure Rear End0321.01.03
BIWBridging Structure Bridging Structure Adhesives0421.01.04
BIWBodyside020021.02.00
BIWBodysideBodyside0121.02.01
BIWBodysideBodyside Adhesive0221.02.02
BIWRoof030021.03.00
BIWRoofRoof Fixed0121.03.01
BIWRoofRoof Adhesive0221.03.02
BIWFront Fender040021.04.00
BIWFront FenderFront Fender0121.04.01
Closures12000022.00.00
ClosuresBonnet Structure010022.01.00
ClosuresBonnet StructureBonnet 0122.01.01
ClosuresBonnet StructureBonnet Hinge0222.01.02
ClosuresBonnet StructureBonnet Support and Struts0322.01.03
ClosuresBonnet StructureBonnet Overslam Bumpers & Wedges0422.01.04
ClosuresBonnet StructureNoise Insulation0522.01.05
ClosuresFront Side Door Structure020022.02.00
ClosuresFront Side Door StructureFront Side Door0122.02.01
ClosuresFront Side Door StructureFront Side Door Hinge0222.02.02
ClosuresFront Side Door StructureFront Side Door Struts0322.02.03
<colgroup><col width="105" style="width: 79pt; mso-width-source: userset; mso-width-alt: 3840;"> <col width="21" style="width: 16pt; mso-width-source: userset; mso-width-alt: 768;"> <col width="166" style="width: 125pt; mso-width-source: userset; mso-width-alt: 6070;"> <col width="21" style="width: 16pt; mso-width-source: userset; mso-width-alt: 768;"> <col width="244" style="width: 183pt; mso-width-source: userset; mso-width-alt: 8923;"> <col width="21" style="width: 16pt; mso-width-source: userset; mso-width-alt: 768;"> <col width="64" style="width: 48pt;"> <tbody> </tbody>
 
Upvote 0
WOW! That is fantastic! Thank you Mick!

I have been trying to develop a piece of VBA which I would appreciate if you could give me some advice on? - if you wouldn't mind?

Private Sub cmbTestDesc_Change()
Dim found As Integer
found = 0
Dim matchTest As Variant
matchTest = cmbTestDesc.Value = Application.WorksheetFunction.Index(Sheets("Working_Sheet").Range("B3:B13"), _
Application.WorksheetFunction.Match(cmbTestDesc.Value, Sheets("Working_Sheet").Range("B3:B13"), 0), 1)
If IsError(matchTest) Then
found = 0
MsgBox ("Type Mismatch")
cmbTestDesc.SetFocus
Cancel = True
Exit Sub
Else:
txtTestProc = Application.WorksheetFunction.Index(Sheets("Working_Sheet").Range("C3:C13"), _
Application.WorksheetFunction.Match(cmbTestDesc.Value, Sheets("Working_Sheet").Range("B3:B13"), 0), 1)
txtUTID.Value = Application.WorksheetFunction.Index(Sheets("Working_Sheet").Range("A3:A13"), _
Application.WorksheetFunction.Match(cmbTestDesc.Value, Sheets("Working_Sheet").Range("B3:B13"), 0), 1)
found = 1
End If
End Sub


The code works similar to a vLookup but because I needed a value to the left of the matched value I have used Index and Match. The code works fine when looking up values and populating other cells, but I cannot for the life of me work out how to allow the user to delete, or manually enter a value in the combo box and then press a command "Add" button. This button would then add a line item to the bottom of a worksheet and also send a notification email to the administrator.

Do you know if this is possible?

Many thanks,

Calum
 
Upvote 0
Try this:-
Let me know what you want to do with the results and any modifications required.
https://app.box.com/s/ljfvoatymez4jae99unx77tg57dlel72

A couple of mods, if possible..?

  • I'm unable to rename the sheet or copy the code across to work in my form.
  • I need to add in a 4th dependency combo box.
  • When deleting one of the dependencies I need the full code box to reset or better still, say for example: (if it was) 11.01.01 and then the final combo box was cleared, (it should say) 11.01.00 Or if one of the dependencies was cleared, it should clear the code.

Thank you for your help mate.

Cal
 
Upvote 0

Forum statistics

Threads
1,214,636
Messages
6,120,664
Members
448,976
Latest member
sweeberry

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