简体   繁体   English

如何按字母引用同一行中的 Excel 单元格

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

相关问题 Excel-对同一行上单元格的公式引用 - Excel - Formula reference to cell on the same row Excel如何输入带有列字母和行号的单元格(动态)否VBA - Excel How to input Cell with column letter and row number (dynamic) No VBA 按行 NUMBER 和列 LETTER 获取 Excel 单元格 - Get Excel Cell by row NUMBER and column LETTER Excel:单元格指示的参考行 - Excel: Reference row indicated by cell Excel公式复制和粘贴具有相同列字母的单元格,但粘贴时将行数增加7 - Excel formula to copy and paste a cell with the same column letter but increase the row amount by 7 as you paste 如何跨行复制 Excel 公式,以便单元格引用行递增并且单元格引用列保持固定 - How to copy Excel formula across row so cell reference row increments and cell reference column stays fixed Excel:如何根据同一行中的另一个单元格锁定一个单元格 - Excel: How to lock a cell based on another cell in the same row 如何在 excel 中将单个单元格拆分为同一单元格的多行 - how to split single cell into multiple row of same cell in excel 如果前一行中的相同单元格相同,如何在Excel中删除整行? - How to delete an entire row in Excel if same cell in preceding row is identical? EXCEL:如何使用自动填充增加工作表但保持单元格引用相同? - EXCEL: How to increment a worksheet but keep the cell reference the same by using autofill?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM