vba 恢复 vlookup 语句的单元格地址
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3738902/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
recovering the cell address of a vlookup statement
提问by l--''''''---------''''''''''''
is there a way to get address_of(vlookup(.....))??
有办法得到address_of(vlookup(.....))吗??
where address_of = "A25"(or something in that format) ??
哪里address_of = "A25"(或那种格式的东西)??
回答by Dez
=ADDRESS(MATCH(60,A1:A12,0),1)
Missed out the ,0making it approximate and not an exact match. This is not good for drop downs combo menus; if two things can be the same, then you need an exact match or it picks up the last one.
错过了,0使它近似而不是完全匹配的方法。这对下拉组合菜单不利;如果两件事可以相同,那么您需要完全匹配或选择最后一个。
回答by Marc Thibault
Use Match rather than Lookup. The formula below assumes you've got a lookup table in A1:A12.
使用匹配而不是查找。下面的公式假设您在 A1:A12 中有一个查找表。
It looks for the value "60" and turns the returned row index into a textual range address (e.g. "$A$6").
它查找值“60”并将返回的行索引转换为文本范围地址(例如“$A$6”)。
=ADDRESS(MATCH(60,A1:A12),1)

