![](/img/trans.png)
[英]Search each cell in a column to find a certain value and copy value from another cell in the row the value is found in
[英]Search for the number in a cell then copy a cell from that row to another cell
我需要将下游数字例如6.25(单元格L2)放入单元格L1中。 但这必须从数据库中找到。 因此,如果Cell B1
匹配column B
中的任何地方,请复制该行的L值,然后复制到原始行即L1的L列中。 我认为VLookup是我正在尝试做的,但无法使其正常工作...
PIPE 17888 Upstream Pit ID 20447 Concrete Circular Pipe 1/04/2015 380 6.36 img008.jpg
PIPE 17888 Downstream Pit ID 22105 Concrete Circular Pipe 1/04/2015 380 Downstream 6.25 img010.jpg
PIPE 17854 Downstream Pit ID 22105 Concrete Circular Pipe 1/04/2015 380 Downstream 6.36 img010.jpg US PIPE NOT FOUND
PIPE 17811 Upstream Pit ID 22105 Concrete Circular Pipe 1/04/2015 380 6.25 img010.jpg
PIPE 18105 Downstream Pit ID 23037 Concrete Circular Pipe 1/04/2015 600 Downstream 5.94 img014.jpg
如果可以确定B列中的每个ID仅对“下游”出现一次,则可以使用允许多个条件的SUMIFS查找正确的值以添加到适当的单元格中。
=SUMIFS($L$2:$L$1000,$B$2:$B$1000,B2,$C$2:$C$1000,"Downstream")
请注意,特定的ID是非固定的单元格引用-在此为B2。
但是,这不会显式标记任何问题。 如果没有找到对应的记录,它将只是评估为零,如果找到两个或更多匹配的记录,它将对结果求和。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.