Your solution does not appear to meet the criteria posted by bijalvp. Your solution will put an integer below every value that is above 60.
If I understand the request correctly, bijalvp wants to put a 1 under the first cell that is greater than 60, then put a 1 under the first cell after that cell that is greater than 120 then put a 1 under the first cell after that cell that is greater than or equal to 180, etc.
If I am not mistaken, with values from 7 - 286, there should never be more than four 1's in Row 2.
Assuming that that is correct, I think the following formula accomplishes that goal.
Put this in A2 and drag it to AJ2. Note the placement of the $. It is essential that they be left in place and that no other $ are added. The formula needs to increase the "look back" range as it moves across the columns.
bijalvp: Please note that I attempted to follow your exact criteria which is why the COUNTIF functions for 60 and 120 are different than the COUNTIF's for 180 and 240.
a number greater 60 and value greater than 120
...and then you said...
and so forth for every value higher than or equal to the next multiple of 60.
Therefore, the COUNTIF criteria for 60 and 120 show ">" while the criteria for 180 and 240 show ">="
Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.
message edited by DerbyDad03