Conditional Validation List

SLARRA

Board Regular
Joined
Sep 22, 2007
Messages
93
I'm sure this has been asked many times, but I can't seem to turn up an applicable solution...

I have a workbook with tables on separate worksheets:

  • Sheet named "CompanyData" has a (formally designated) table named "Companies" that includes a data field named "CompanyID". There is one record per company, each with a unique "CompanyID".
  • Sheet named "SalesRepData" has a (formal) table named "SalesReps" that includes data fields named "CompanyID" and "SRepID". For each Sales Rep's record in this table, I pick the his/her "CompanyID" (using Excel's built-in data validation tool, referenced to a list whose source is the "CompanyID" field in the "Companies" table <-- this I can do already), and then create and assign a unique "SRepID". This table is not sorted, and there can be multiple Sales Reps associated with any given Company. For example, there may be 5 records (SRepIDs: AJones01, BSmith01, JDavis01, BSmith02, and MThomas01) that collectively document the Sales Reps who all work for a particular company (CompanyID: 123-AcmeInc)

On a third sheet, which will have a table of transactions, I want to create new records by first picking a CompanyID (again, via validation list tied to the "CompanyID" field in the "Companies" table <-- this I can do already) and then associate the transaction with that Company's Sales Rep who initiated it (<-- this is where I need some help). That is, I want to pick a SRepID from a validation list that is sourced from the SRepID field on the SalesReps table. But, I want that validation pick list to be filtered to only show the Sales Reps who work for the chosen Company. For example, if the transaction record is associated with the 123-AcmeInc company, I want the pick list domain for that table's SRepID field to be constrained to only list AJones01, BSmith01, JDavis01, BSmith02, and MThomas01.

To enable that conditional (filtered, based on CompanyID) validation list for transaction records, I think there are at least 2 obstacles. First, the sources are "living" tables, with new Companies and new Sales Reps being added daily to their respective tables. Secondly, the SalesReps table is not sorted, so a given company's Sales Reps' records are not grouped into a contiguous range. Thus, I presume, deriving the validation list source will involved using array formulas, named ranges with the INDIRECT function, and - possibly - MATCH and OFFSET techniques, but I am unable to solve this myself.

Thanks in advance!

SDL
 
Glad to help & thanks for the feedback
 
Upvote 0

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

Forum statistics

Threads
1,224,828
Messages
6,181,217
Members
453,024
Latest member
Wingit77

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