Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
531 views
in Technique[技术] by (71.8m points)

excel - Using the value in a cell as a cell reference in a formula?

I'd like to know how to pull cell references from the value of another cell and insert them into a formula.

For a simple example:

In cell A1 I have this: COUNT(B4:H4)

Instead of choosing the range when I set up the formula, I'd like this range to be dynamic, based on the value in other cells.

So, I want to type in cell references: in cell B4, I'd type in C5, and in H4 I'd type in C8. How can I set up my formula to look inside cells B4 and H4, but then return the range that is defined by the values in these cells (C5:C8 in this case...) So in the end, cell A1 would return the count of C5:C8

I hope that makes sense. It seems like something pretty simple but I can't seem to find info on it. Thanks in advance.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Use INDIRECT()

=SUM(INDIRECT(<start cell here> & ":" & <end cell here>))

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...