简体   繁体   English

如果其他单元格与特定值匹配,如何在公式中引用特定单元格

[英]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.

相关问题 如何基于其他两个单元格的内容引用公式中的特定单元格 - How to reference a specific cell in a formula based on the contents of two other cells Excel VBA / Formula用于基于其他2个单元格的值填充3个特定单元格 - Excel VBA/Formula for populating 3 specific cells based on the value of 2 other cells 动态引用特定单元格的公式 - Formula with dynamic reference to a specific cell 当其他像元值等于特定值时为像元着色 - Color cells when other cell value equals specific value 当两个工作表中的单元格匹配且具有单独的特定值时,如何更改单元格值? - How to change a cell value when cells from two worksheet match and a separate specific value? Vba宏如果单元格包含值,则在其他单元格上输入特定文本 - Vba macro if cell contains value, then input specific text on other cells 如何在公式中使用行号/如何从其他单元格中提取特定值(excel) - How to use row number in formula/how to extract specific value from other cell (excel) 查找单元格值的一部分与其他单元格中的值完全匹配的公式 - Formula to find part of a cell's value as exact match to a value from other cells 如果其他单元格包含特定文本,则将特定单元格的总和放入一个单元格中 - Put in a cell the sum of specific cells if other cells contains a specific text 使用公式复制范围内特定值的单元格 - Copying Cells with a Specific Value in a Range using a Formula
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM