Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 840
KrazyKiddo8 Avatar asked Aug 27 '12 23:08

KrazyKiddo8


People also ask

How do you reference a cell based on a value in another cell?

Click the cell where you want to enter a reference to another cell. Type an equals (=) sign in the cell. Click the cell in the same worksheet you want to make a reference to, and the cell name is automatically entered after the equal sign. Press Enter to create the cell reference.

How do you reference a value instead of formula in a formula in Excel?

To copy the actual value instead of the formula from the cell to another worksheet or workbook, you can convert the formula in its cell to its value by doing the following: Press F2 to edit the cell. Press F9, and then press ENTER.

How do you display a value in a cell formula instead of references?

You can do the same manually. Press F2, click on the formula entry area, or double click on the cell to enter edit mode. Then select the cell reference(s) and press F9. You can select any part of the formula that results in a returned value to see what that value is, very helpful for troubleshooting formulas.

How do you reference a cell text in a formula?

Usually you type =A1 for referring to the cell A1 in Excel. But instead, there is also another method: You could use the INDIRECT formula. The formula returns the reference given in a text. So instead of directly linking to =A1, you could say =INDIRECT(“A1”).


1 Answers

Use INDIRECT()

=SUM(INDIRECT(<start cell here> & ":" & <end cell here>)) 
like image 157
ApplePie Avatar answered Oct 11 '22 11:10

ApplePie