To use the offset from columns C to Z in the current row:
- select any cell in the first row
create a named range ( Formulas > Name Manager > New... ) using Name: e.g. validation and Refers To: will be your formula:
=OFFSET($C1;0;0;1;COUNTA($C1:$Z1))
- users with English, use
, instead ; as a list separator
select cells and apply Data Validation > Allow: List , Source: =validation
When you select a cell in the second row and observe the Name Manager , you will notice that the formula uses relative references to the current row.
To fill the cells with the default value, you can use the following formula (as a normal formula inside a cell, it has nothing to do with the data validation function):
=INDEX(validation, 1)
and when you actually select a value from the drop-down list, the formula will be overwritten with the selected value, so when you change the 1st element in your list, the value will not change for explicitly selected cells.
Aprillion
source share