Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/excel/28.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
要从多个列中获取的Excel下拉列表_Excel_Validation_Drop Down Menu - Fatal编程技术网

要从多个列中获取的Excel下拉列表

要从多个列中获取的Excel下拉列表,excel,validation,drop-down-menu,Excel,Validation,Drop Down Menu,我已经想了两个小时了,我只需要寻求帮助。我试图在Excel中有一个下拉列表,当您选择一个项目时,它也会从它旁边的列中提取信息 表1 Name | City | State John | Cty1 | CA Luke | Cty2 | IA Kris | Cty3 | TX 第2页 Name | City | State ___v | ____ | __ 所以我想做的是,当你在第二张纸上选择名字时,它会从第一张纸上取城市和州,并自动填充到第二张纸上的行中。有人能帮我吗?我快发疯了 谢谢。试试这

我已经想了两个小时了,我只需要寻求帮助。我试图在Excel中有一个下拉列表,当您选择一个项目时,它也会从它旁边的列中提取信息

表1

Name | City | State
John | Cty1 | CA
Luke | Cty2 | IA
Kris | Cty3 | TX
第2页

Name | City | State
___v | ____ | __
所以我想做的是,当你在第二张纸上选择名字时,它会从第一张纸上取城市和州,并自动填充到第二张纸上的行中。有人能帮我吗?我快发疯了

谢谢。

试试这个:-

To create dropdown for Name

1. First copy paste values of NAme from Sheet1 in Sheet2. Say you pasted them in A1 to A3.
2. Under name (say D3 cell in sheet2) column go to D4 cell just below name,then Go the 'Data validation' tab under 'data' tab. Select 'data validation' again, a dialog box will appear.
3. In the dialog box under 'Allow' select 'List' and then in 'Source' make a selection from A1 to A3.


    Now Use this formula in sheet2 
    for city 
    =IFERROR(VLOOKUP(D4,Sheet1!$D$15:$F$18,2,0)," ")

    for state
    =IFERROR(VLOOKUP(D4,Sheet1!$D$15:$F$18,3,0)," ")

    This is assuming in Sheet1 D15 to D18 has values for column Name & D4 is value of Name or Name dropdown in Sheet2
希望这有帮助:-)