Home |
Search |
Today's Posts |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have a semi-working solution based on the following:
=OFFSET(Brand,MATCH($C2,Manufacturer,0)-1,0,COUNTIF(Manufacturer,$C2)) With the Manufacturer / Brand lists the entries may not be sorted. I can do this manually of course, however I am wondering if there is a way to handle the lists in an unsorted way. The same two columns apply, ... If this is tangential or redundant, forgive the digression. There's a way to create a dynamic data validation list using only Excel formulas. The approach does use a lot of work space for intermediate results, though. It starts from the long two-column list, dynamically builds a two-dimensional "Make" vs. "Color" matrix in an out-of-the-way place, and uses the matrix for the data validation formulas. It's not elegant and it doesn't use named ranges, but it does seem to fill the need. For visual clarity, my example uses one worksheet, but the work can be split among two or more using the same basic approach. Columns A:B hold the original data. Column A contains the "Make" values; B, the "Colors." Duplicated Make values need not be contiguous. D1 will have data validation for Makes; D2, for Colors. In F1, put the number 1. In F2, put =IF(A2="","",IF(COUNTIF(A$1:A2,A2)1,"",MAX($F$1:F 1)+1)) and copy down past the end of the original list. In H1, put =IF(ROW()MAX(F:F),"",INDEX(A:A,MATCH(ROW(),F:F,0) )) and copy down as far as before. In I1 put =IF(H1="","",COUNTIF(A:A,H1)) and copy down as far as before. In G1, put =IFERROR(100*MATCH(A1,H:H,0) + COUNTIF(A$1:A1,A1),"") and copy down as far as before. In J1, put =IFERROR(INDEX($B:$B,MATCH(100*ROW()+COLUMN()-9,$G:$G,0)),"") and copy down as far as before. Select the formula-containing cells in column J, and copy them rightward more columns than the largest number of Colors for any Make. In D1, use the data validation formula =OFFSET($H$1,0,0,MAX(F:F),1) In D2, use the data validation formula =OFFSET(I1,MATCH(D1,H:H,0)-1,1,1,VLOOKUP(D1,H:I,2,FALSE)) Changing columns A:B should update the data validations without other intervention. (I have Excel 2010.) |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Dynamic List Data Validation | Excel Discussion (Misc queries) | |||
Dynamic Data Validation List | Excel Discussion (Misc queries) | |||
data validation invalid in dynamic validation list | Excel Discussion (Misc queries) | |||
data validation invalid in dynamic validation list | Excel Worksheet Functions | |||
data validation invalid in dynamic validation list | Excel Programming |