Excel: Dropdown list dependant on other dropdown list

后端 未结 2 2054
醉梦人生
醉梦人生 2020-12-12 05:19

I want the following in Excel:

Two dropdown lists in adjacent cells:

Dropdown list #1 | Dropdown list #1

Dropdown list 1:
One
Two
Three
         


        
2条回答
  •  死守一世寂寞
    2020-12-12 05:48

    This solution avoids the use of the volatile OFFSET function.

    For the first Data Validation located at A2 use this formula:

    =$D$1:$F$1
    

    For the second Data Validation located at B2 use this formula:

    = INDEX( $D$2:$F$4, 0, MATCH( $A$2, $D$1:$F$1, 0 ) )
    

    The second formula uses the value selected from the data Validation in A2 to MATCH the corresponding column in D1:F1 and applies the column number to the INDEX function to return the whole column in range D2:F4.

    The function INDEX( reference, row number, column number ) returns the entire column or row of the referenceby entering 0 as the row number or column number respectively.

提交回复
热议问题