在vlookup公式中使用单元格值
=vlookup(c2,code1,2,false)
我正在使用 vlookup 代码,但我想使用“c2”中的单元格值而不是 c2 本身。该单元格内的值将发生变化,目前为“aj2”。有一个简单的方法可以做到这一点吗?
您好,谢谢,这似乎不适合我想要的。我想如果我解释一下我最终想做什么可能会更容易。我希望能够输入列引用,即 B(不包括单元格行)。
Sheet1(输入列参考)
AB
Code1-B(此单元格值将会更改)
Sheet2(名称引用“code1”)
AB
开始前-1
已建立-2
Sheet3(从另一个文件粘贴的数据 - 此数据将更改)
ABC
1-Pre Start-=vlookup(显示代码1中的“1”) 2-Established- =vlookup(显示代码1中的“2”)
3-Established- =vlookup(显示代码1中的“2”)
4-Pre Start-=vlookup(显示代码1中的“1”) 5-Pre Start-=vlookup(显示代码1中的“1”)
=vlookup(c2,code1,2,false)
I am using the vlookup code but I would like to use the cell value in 'c2' rather than c2 itself. The value within this cell will change, at the moment it is 'aj2'. Is there an easy way of doing this?
Hi Thanks, that doesn't seem to work for what I want. I suppose it might be easier if I explain what I want to do eventually. I would like to be able to type in a column reference i.e. B (excluding the cell row).
Sheet1 (Input column reference)
A-B
Code1-B (this cell value will change)
Sheet2 (Name reference 'code1')
A-B
Pre Start -1
Established-2
Sheet3 (Data pasted from another file-this data will change)
A-B-C
1-Pre Start- =vlookup (Show '1' from the code1)
2-Established- =vlookup (Show '2' from the code1)
3-Established- =vlookup (Show '2' from the code1)
4-Pre Start- =vlookup (Show '1' from the code1)
5-Pre Start- =vlookup (Show '1' from the code1)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以使用
=INDIRECT
:You could use
=INDIRECT
:这里你错过了 INDIRECT:- 你可以使用这个,可能会帮助你
=VLOOKUP(INDIRECT(C2), code1, 2, 0)
Here you miss INDIRECT:- You Can use this and may help you
=VLOOKUP(INDIRECT(C2), code1, 2, 0)