[英]Excel: How to find a certain row and multiply the values in that row by a certain number?
I'm trying to find a specific row by checking its unique code and multiply all the values in that row by its weight.我试图通过检查其唯一代码并将该行中的所有值乘以其权重来查找特定行。 Please see the example below.
请看下面的例子。
A B C D E F G
code weight code price quantity new_p new_q
A11 0.1 A11 10 5 1 0.5
A12 0.2 A12 4 3 0.8 0.6
A11 0.3 A13 2 9 3 1.5
A14 0.2 A14 4 16 0.8 3.2
A12 0.4 1.6 1.2
A11 0.8 8 4
In the above example, my goal is to get the values in column F and G. You can see AB and CE as two separate spreadsheet: Basically, for each row in A, I look for its corresponding original price and quantity from D and E and then multiply the values in D & E by its unique weight from B, which will result in a new price and a new quantity.在上面的示例中,我的目标是获取 F 和 G 列中的值。您可以将 AB 和 CE 视为两个单独的电子表格:基本上,对于 A 中的每一行,我从 D 和 E 中查找其对应的原始价格和数量然后将 D & E 中的值乘以其来自 B 的唯一权重,这将产生新的价格和新的数量。
I have been using sumproduct, but is there any smarter way of doing this?我一直在使用 sumproduct,但是有没有更聪明的方法来做到这一点?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.