I would like to know if it is possible to reference a cell in Excel depending on the value of another cell.

Example

I have a cell, let's say

`A1`

where I have the row number that I want to use (e.g., the content of`A1`

is`42`

)I want to compute the sum of column

`B`

from row`1`

to the row corresponding to the number given in`A1`

. Something like`=SUM( B1:B<NUMBER_IN_A1> )`

Is there any way?