'Creating a range that links to a closed spreadsheet
The databases that I use at work are created by a macro that automatically includes a couple of calculations beneath the data that calculate the change over the month and the annual change. This data gets updated on a monthly basis, so the cell reference where the calculations occur shifts downwards by 1 row per month (e.g. when we have data for March 2022 this would be added in row 15 and the monthly change calculation would shift down to row 17). The screenshot below is a rough example of the structure that the data is in (as I can't show you the actual data...)
I want to be able to create a range that finds the max/min of the values within the database without including any of the calculations (as some of these are likely to fall below the minimum value). This means that I can't just simply calculate the max/min for the entire column. For example, if I want to find the maximum of Var X, I can use the following equation to find the maximum within the range of B2:B14
=MAX(B$2:INDEX(B$2:B$1048576,MATCH(MAX($A$2:$A$1048576),$A$2:$A$1048576,0),)).
The problem is that using INDEX in this way causes the function to return #REF! if the database spreadsheet is closed when I open up the spreadsheet that this formula is saved in. Ideally I would like to find a function that can fulfil the same purpose without requiring the database spreadsheet to be open. Is anyone aware of a function that could be used to achieve the same result?
I have also tried a combination of INDIRECT and CONCAT, but this also returns the same #REF! error
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

