简体   繁体   English

根据单元格值在VLOOKUP-Function中创建矩阵的工作表名称

[英]Create worksheetname of matrix in VLOOKUP-Function from Cell-Value

I've got a working VLOOK-Function. 我有一个工作正常的VLOOK函数。 The Matrix is on a different worksheet. 矩阵在另一个工作表上。 Here is my function (in german): 这是我的功能(德语):

=SVERWEIS($A1;Haus!$B$13:$K$100;7;falsch) = SVERWEIS($ A1; Haus!$ B $ 13:$ K $ 100; 7; falsch)

=VLOOKUP($A1,Haus!$B$13:$K$100,7,false) = VLOOKUP($ A1,Haus!$ B $ 13:$ K $ 100,7,false)

I have lot of different worksheets and I do not want rewrite each formula by replacing Haus with the name of a different worksheet. 我有许多不同的工作表,并且我不想通过用不同工作表的名称替换Haus来重写每个公式。

Is it possible to call the name from a cell? 是否可以从单元格中调用该名称? I want to have in Row 1 all worksheetnames and in row two the VLOOKUP-Function. 我想在第1行中拥有所有工作表名称,在第二行中拥有VLOOKUP-Function。 In my imagination it should then be possible to drag the formula right and it autocompletes the formula with the right names. 在我的想象中,然后可以向右拖动公式,并使用正确的名称自动完成公式。

A1 Haus A1豪斯

A2 =VLOOKUP($A1,Haus!$B$13:$K$100,7,false) A2 = VLOOKUP($ A1,Haus!$ B $ 13:$ K $ 100,7,false)

B1 Boot B1靴子

B2 =VLOOKUP($A1,Haus!$B$13:$K$100,7,false) B2 = VLOOKUP($ A1,Haus!$ B $ 13:$ K $ 100,7,false)

C1 Pool etc. C1泳池等

I tried it with CELL("Content", A$1)&"!"$B$13:$K$100 inside the VLOOKUP-Function but it did not work as expected. 我在VLOOKUP函数中用CELL(“ Content”,A $ 1)&“!” $ B $ 13:$ K $ 100尝试了一下,但是它没有按预期工作。

Any ideas? 有任何想法吗?

Check out the INDIRECT function. INDIRECTINDIRECT功能。 Say you have your sheet name in A1 and the value that you want to look for is in A2. 假设您的工作表名称在A1中,而要查找的值在A2中。 You could have formula in A3 like 您可以在A3中使用公式

=VLOOKUP(A2, INDIRECT(A1&"!$B$13:$K$100"), 7, FALSE)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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