[英]how to reference a specific cell in a formula if other cells match a specific value
Thanks so much for looking at my question.非常感谢您看我的问题。 I am trying to create a formula that subtracts a specific value from another formula, However.
但是,我正在尝试创建一个从另一个公式中减去特定值的公式。 that specific value may change.
该特定值可能会改变。
Example:例子:
A B C D
1 1 100 =(2000 - ( if A = 1, i want to subtract the C value where B =1))
1 2 250
1 3 310
1 4 .
2 1
2 2 =((2000 - ( if A = 2, i want to subtract the C value where B =1))
2 3
2 4
3 1
3 2
3 3
3 4
(A,B,C,D are the columns) (A,B,C,D 是列)
Hopefully this makes sense.希望这是有道理的。 I am trying to subtract the C value that goes along with the B1 value for each different A.
我试图减去与每个不同 A 的 B1 值一起出现的 C 值。
I was thinking an index match of some sort but wasnt exactly sure how to do that when the A's change.我正在考虑某种索引匹配,但不确定当 A 发生变化时如何做到这一点。 Thanks so much in advance for help!
非常感谢您的帮助!
INDIRECT or INDEX functions can help you. INDIRECT 或 INDEX 函数可以帮助您。 See this answer .
看到这个答案。
Would something like a nested if function work for you here?如果 function 在这里为您工作,像嵌套的东西吗? For example:
例如:
=IF(A2=1,IF(B2=1,2000-C2,"Enter calculation if B2<>1"),"Enter calculation if A2"<>1)
If this works, then you can simply copy/paste the function down the rows in column D.如果这可行,那么您可以简单地将 function 复制/粘贴到 D 列的行中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.