How to autofill X amount of columns based on whatever numeric value X is

Copper Contributor

Hi,

I've been looking for a solution to the following problem since yesterday afternoon and it has me completely stumped.

I'm looking for a formula or function that will allow me to auto fill "X" amount of columns, based on whatever value "X" is.

For instance;

In the context I'm using it, it is for apprenticeship funding so:

Row 1, Columns 1 through 34 are months i.e. March 2018 through December 2020.

If Billy's apprenticeship lasts 12 months, starting May 2018, then cells May 2018 through May 2019 (12 months) auto fill with the correct formula.

Is there any way to do this?

Any help would be hugely appreciated

Regards

James

1 Reply

Hello,

 

your formula has some differencieas through the range. However you can use below formula to add values to the required cells.

=(COLUMN()>=MATCH($G2;$1:$1;0))*(COLUMN()<MATCH($G2;$1:$1;0)+$I2)*171

change number 171 as required.