# Help. For loop is wonky

For loop doesn’t work correctly and I don’t know why. I want it to look between 7 (a7d) and 30(a30d) days into the future both for holidays and events. If it recognize that there is any event show the element.

I understand you want to see if there is any event between a7d and a30d (so between next week and 30 days from now), the formula you are showing will not sum them, will only show the acount for those days so something like: 0100 (assuming a7d has 0, a8d has 1, a9d has 0…). So this will result in being “100” as a number, not “1”.

I cannot debug it now, but you should test the loop expression alone first to see what it does

Aahh that’s right! Then I understand and I think I know how to solve it. The thing is another element will show if there is anything between a0d to a6d. So maybe I could just add that argument to this to not show anything if there is something between a0d to a6d. 010001 is still over 0 so I think that doesn’t matter in this case.
Thank you for the information!

But if I would like to sum the equation, how would I do that?

Right now it looks like this. A0d will say that the events is happening today, a1d says tomorrow and a2d to a6d will say the day while this says the calendar date.

Now it’s overlapping