简体   繁体   中英

Non-volatile way to use table for data validation without using INDIRECT

One place where I often use the INDIRECT function is for data validation. If I have a table called tabColor with a column called Color , and I want to use that for data validation , you would think you could set up the data validation as a list with this formula:

=tabColor[Color]

However, this causes an error. If you wrap the formula with INDIRECT , it works:

=INDIRECT("tabColor[Color]")

So, I have two questions:

  1. Will using INDIRECT in data validation cause the cell to be marked as volatile?
  2. Is there a non-volatile way to use a table for data validation?

Btw, if you want to know more about volatile functions, a nice write-up can be found at chandoo.org

  1. Yes. The data validation list is refreshed whenever any calculation cycle in the workbook runs. This is a form of invisible parasitic calculation lag when volatile formulas are used in Data Validation, Named Ranges, Conditional Formatting rules, etc.
  2. Create a Named Range with the Refers to: as =tabColor[color] then use the name of the named range as the Data Validation list's Source: . Sadly, table naming conventions have not caught up with all of the features where they should be able to be used directly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM