简体   繁体   English

从其相对位置获取单元格的值

[英]Getting the value of a cell from its relative position

I've recently been asked to create a spreadsheet for work that will return the lowest bid price from any of our suppliers. 最近有人要求我为工作创建电子表格,该电子表格将返回我们任何供应商的最低出价。 I got the basic spreadsheet from management and they want me to get it working. 我从管理层那里获得了基本的电子表格,他们希望我能够使其正常工作。 It looks like this 看起来像这样

电子表格示例

I've found the minimum value from the four pricing columns easily enough, but I need to get the vendor id and the deal number and display them on the right side as well, as this spreadsheet could have tens of thousands of entries. 我已经很容易地从四个定价列中找到了最小值,但是我需要获取供应商ID和交易号,并将它们显示在右侧,因为此电子表格可能有成千上万的条目。

Does anyone know of any method I could use to get the Vendor ID and Deal Number values from their relative position to the smallest price value? 有人知道我可以使用任何方法从相对位置获取卖方ID和交易编号值到最小价格值吗?

This will give you the lowest price vendor. 这将为您提供价格最低的供应商。

=INDEX(B2:Q2,MATCH(R2,B2:Q2,0)-3) = INDEX(B2:Q2,MATCH(R2,B2:Q2,0)-3)

Since Vendor appears three columns to the left of price, you are offsetting match by -3. 由于供应商显示在价格左侧的三列中,因此您将匹配值偏移了-3。 For bid number you will offset by -2. 对于出价编号,您将偏移-2。

However, there is more than one vendor with the lowest price, you will get the one who appears first. 但是,有多个价格最低的供应商,您将得到第一个出现的供应商。

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

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