TLDR: terminating a formula that increments based on a variable value with another formula without using any built-in functions/commands/methods


Hi all,

I'm trying to auto-increment and terminate a formula based on a variable value.

For example, cell A6 has a value of 26.
In column B, I would like a formula to start at cell B2, increment to cell B27, and then stop.
Next, if I were to change A6 to something like 45, the formula in column B would automatically extend to B46.
Rather than returning a 0-length string or a 0 in cell B28/B46 and beyond, I would like for cell B28 to be completely blank, no formula or anything.
I'm trying to do all this via a formula or formulas, so not using any built-in functions/commands.

I know you can just drag to fill the formula down a column, but I'm dealing with hundreds of rows and will be repeating this step on many many sheets and am trying to automate this process.
I would rather not have to use VBA here, but if no other solutions are possible, then that's fine.

Thank you.