Home > front end >  recurring series/values every nth week
recurring series/values every nth week

Time:09-29

I have one special case and wondering if there is a logic or Excel formula that can help in this.

I have weeks data in column A and random numbers occurring randomly in column B, in column C is the desired output:

enter image description here

The wish is that every value in column B other than zeros occur in column C every three weeks from the respective week in column A. If two values happen to end up in the same cell, then summing them up. Is this doable?

CodePudding user response:

This should do it using Offset() and Sum(), the IsError() is so the first few rows have a 0 in them.

=IF(ISERROR(SUM(OFFSET(C2,-3,0),OFFSET(C2,-3,-1))),0,SUM(OFFSET(C2,-3,0),OFFSET(C2,-3,-1)))
  • Related