[英]How to reference a Excel cell in the same row by letter
Example of data:数据示例:
I have a IF function in Excel that I would like to work dynamically but am not sure how to reference another cell by letter in the same row.我在 Excel 中有一个 IF function 我想动态工作,但不确定如何在同一行中逐个字母引用另一个单元格。
This statement is in E4(Excel Function):此语句在 E4(Excel 函数)中:
IF(C4=Drake, "True", "False")
But I would like to use this statement in all rows in E so instead of C4 I need 'Cx' so the function would work in E5 too.但是我想在 E 的所有行中使用这个语句,所以我需要'Cx'而不是 C4,所以 function 也可以在 E5 中工作。
Excel references are treated as relative by default when you copy/pate or fill, so if you copy that formula from cell E4 to cell E5, the formula will be updated to Excel 引用在您复制/粘贴或填充时默认被视为相对,因此如果您将该公式从单元格 E4 复制到单元格 E5,公式将更新为
IF(C5=Drake, "True", "False")
If you don't want the formula to be relative, then prepend the row or column (or both) with a $
.如果您不希望公式是相对的,请在行或列(或两者)前面加上$
。
For example, if your formula was例如,如果您的公式是
IF(C$4=Drake, "True", "False")
and you copied it from E4 to E5, the formula would stay并且您将其从 E4 复制到 E5,公式将保留
IF(C$4=Drake, "True", "False")
but if you copied it from E4 to F4, it would change to但如果你把它从 E4 复制到 F4,它会变成
IF(D$4=Drake, "True", "False")
Since the row is anchored but the column is not.由于行已锚定,但列未锚定。
=IF(OFFSET($E4,0,-2) = "Drake",TRUE,FALSE)
Then Fill Down.然后填写。
HTH高温高压
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.