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.
This statement is in E4(Excel Function):
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.
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
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
IF(C$4=Drake, "True", "False")
but if you copied it from E4 to F4, it would change to
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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.