尝试将vlookup扩展到其他单元格,而不会自动更改值 [英] trying to expand vlookup to other cells without automatically changing values

查看:107
本文介绍了尝试将vlookup扩展到其他单元格,而不会自动更改值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在设置一个vlookup来从工作簿中的另一张表中提取产品价格。代码适用于单元格,但是当我尝试将代码扩展或复制到下一行时,它会自动更改数据table_array值。

I am setting up a vlookup to pull product prices from another sheet within the workbook. The code works for the cell but when i try to expand or copy and past the code into the next row it automatically changes the data table_array value.

= VLOOKUP(B5,价格!1:65536,3)

=VLOOKUP(B5,Prices!1:65536,3)

在代码中,我想要第一个值,B5与它所在的行进行比例,但是第二个值需要保留相同。我该怎么做这样做?还有一种方法,如果没有有效的零件号,我可以让单元格保持空白,而不是显示N / A?

Within the code i want the first value, B5 to scale with the row it is in, however the second value needs to remain the same. How do i go about doing this? Also is there a way that i can get the cell to remain blank instead of displaying N/A if there isnt a valid part number?

感谢您的帮助! p>

Thanks for your help!

推荐答案

对于第二部分,IF公式可以正常工作:

For the second part, an IF formula will work fine:

=IF(ISERROR(VLOOKUP(B5,Prices!1:65536,3)),"",VLOOKUP(B5,Prices!1:65536,3)),"")

如果我理解正确,第一部分你尝试设置绝对值?例如:

And if I understand correctly the first part have you tried set an absolute value? Something like:

    =IF(ISERROR(VLOOKUP(B$5,Prices!1:65536,3)),"",VLOOKUP(B5,Prices!1:65536,3)),"")

这篇关于尝试将vlookup扩展到其他单元格,而不会自动更改值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆