[英]Use a Dynamic Range in an Excel Formula
I have a collection of tables with similar names: mytable1, mytable2, mytable3... 我有一组名称相似的表:mytable1,mytable2,mytable3 ...
I need to create a VLOOKUP formula that uses one table or another depending of the value of a named cell ( Cell "A1" = rngChoice ) , for example: 我需要创建一个VLOOKUP公式,该公式使用一个表或另一个表,具体取决于命名单元格的值(单元格“ A1” = rngChoice),例如:
If rngChoice = 1 then use mytable1
If rngChoice = 2 then use mytable2
If rngChoice = 2 then use mytable2
I could use the formula: 我可以使用公式:
=IF(rngChoice=1;VLOOKUP("value";mytable1;"return column";FALSE);
IF(rngChoice=2;VLOOKUP("value";mytable2;"return column";FALSE);
IF(rngChoice=3;VLOOKUP("value";mytable3;"return column";FALSE) (...)
I can't use this formula because I may need to add or remove tables, so the formula should be changed every time, what's impossible to me. 我无法使用此公式,因为可能需要添加或删除表,因此每次都应更改该公式,这对我来说是不可能的。
What I need is something like: 我需要的是这样的:
=VLOOKUP("value";"mytable" & "table number";"return column";FALSE)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.