PDA

View Full Version : Cumulative sum based on a condition



spittingfire
01-19-2017, 04:32 PM
Hi all,

I have attached a sample sheet with some sample data.

Row B2:AW2 I have interval times in half hour intervals. Rows below B2 have the data. What controls the condition is cell AY1.

What I want is a formula in column AY from AY3 that will sum the row B:AW for each row. For example if AY1 = 18:30 then

Test1 = 162
Test2 = 769
Test3 = 1568
Test4 = 915
Test5 = 2916

Any help would be appreciated.

Thanks

SamT
01-19-2017, 09:53 PM
what if AY1 is 22:30 as it is in the attachment?

Better to tell or show why some values are summed and other are not summed.

spittingfire
01-20-2017, 03:08 AM
whatever value is in AY1 it will sum the cumulative up to that time - so in your case if it is 22:30 then I want it sum up to 22:30. The value is AY1 will change every 30 minutes reflecting the current interval that we are in. So the cumulative sum will be based on the condition of what is currently showing in AY1.