如何在Google Sheets中通过公式E{(A2+A4)}动态引用行号
Solution for Dynamic Cell Reference Using Summed Values in Google Sheets
In Google Sheets, the syntax you tried (E{(A2+A4)}) isn't valid, but there's a straightforward way to achieve what you want using the INDIRECT() function—this function lets you construct a cell reference as a text string and then convert it into an active, usable reference.
The Core Formula
Here's the exact formula you need:
=INDIRECT("E" & (A2 + A4))
How It Works
Let's break down each part to make it crystal clear:
"E"specifies the fixed column you want to target (you can adjust this to any column letter if needed)&is the concatenation operator—it joins the column text with your calculated row number(A2 + A4)computes the sum of the two cells, giving you the exact row number to reference in column E
Example Walkthrough
When A2=10 and A4=5:
- The formula first calculates
10 + 5 = 15 - It concatenates
"E"with15to create the text string"E15" INDIRECT()converts that text string into a real cell reference, pulling the value directly from cellE15
Handling Errors (Optional)
If there's a chance A2 + A4 could result in an invalid row number (like a negative value, 0, or a row beyond your sheet's total rows), wrap the formula in IFERROR() to return a friendly message instead of a messy #REF! error:
=IFERROR(INDIRECT("E" & (A2 + A4)), "Invalid row number")
内容的提问来源于stack exchange,提问作者Jimbo
相关产品推荐
相关产品推荐

