Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 153
Default Dynamic Data Validation list

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.)
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic List Data Validation Bean Counter[_2_] Excel Discussion (Misc queries) 5 May 17th 10 03:35 PM
Dynamic Data Validation List Ken G. Excel Discussion (Misc queries) 2 February 1st 07 06:15 AM
data validation invalid in dynamic validation list ilia Excel Discussion (Misc queries) 0 November 7th 06 12:54 PM
data validation invalid in dynamic validation list ilia Excel Worksheet Functions 0 November 7th 06 12:54 PM
data validation invalid in dynamic validation list ilia Excel Programming 0 November 7th 06 12:54 PM


All times are GMT +1. The time now is 01:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"