Automatically updating Data Validation lists based on user input

不打扰是莪最后的温柔 提交于 2019-12-08 03:10:30

问题


I have a very large data set (about 16k rows). I have 10 higher level blocks and within each block I have 4 categories (10 rows for each) which use Data Validation lists to show items available in each category. The lists should automatically update based on user input. What I need your help with is that I want to use the same data set for each block and preferably a least calculation/size intensive approach. I have put together a sample file that outlines the issue with examples.

Sample File

Thank you for your help in advance.


回答1:


Okay, I've found something, but it can be quite time consuming to do.

  1. Select each range of cells. For instance, for the first one, select B3:B18 and right click on the selection. Find 'Name a Range..." and give it the name "_FIN_CNY". Repeat for all the other ranges, changing the name where necessary.

  2. Select the first range of cells to get the data validation, and click on "Data validation", pick the option "Allow: List" (you already have it) and then in the source, put the formula:

    =INDIRECT($G$4&"_CNY")
    

    $G$4 is where the user will input. This changes as you change blocks.
    _CNY is the category. Change it to _CNY2 for the second category.

  3. Click "OK" and this should be it. Repeat for the other categories.

I have put an updated file on dropbox where you can see I already did it for the data of _FIN for categories CNY, CNY2 and INT and did the one for _GER as well. You'll notice the category of INT for _GER doesn't work, that's because the Named Range _GER_INT doesn't exist yet.



来源:https://stackoverflow.com/questions/16795784/automatically-updating-data-validation-lists-based-on-user-input

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!