# If condition is met then 1 for n number of times in a loop



## Brix23 (Jan 3, 2023)

Dear all, 

I am trying to create a formula which has two parts:  
- the first part of the formula which I have managed to do =IF(MOD((IF(COLUMN(Q218)>=$A219;COLUMN(Q218);0))-1;$C218)=0;1;0), so after a certain date/column insert 1 and do this every n number of periods/columns
- now what I would like to add in a row bellow is the following, if condition is meet, namely if in the above row I have 1 (from the above equation) then have  0 for y number of periods. So for instance  in the example bellow , if I have 1 in the row 2018 then I want in the row bellow 0 for n number of times which in this case is 3 (but this can change as well). Also, an important thing to mention is that this will not only happen once but several times. If






If someone is able to help me I would be truly appreciative. The only thing I can think about is nested if functions, but I hope there is a better way.


----------

