Peter_07
Peter_07

Reputation: 117

recurring series/values every nth week

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?

Upvotes: 0

Views: 162

Answers (1)

Warcupine
Warcupine

Reputation: 4640

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)))

Upvotes: 1

Related Questions