Reputation: 1
To preface, i am a total newbie at excel and am just learning everything. I am applying simpsons rule to a data set, and have the rule automatically update and change spacings and location based on the count of numbers in the set. However, with simpsons rule, you need to sum the values in their multiplier sets. Ive attached an image with colors next to the sets to help explain. I need to sum a 1 3 3 1 set and then all 1 4 1 sets in any location inside the column.
Does anyone know how I could formulate or use a function to allow a condition to sum based on a set of values in 3 different cells?
Ive tried sumif commands, if statments, using sumif with the EXACT function, array matching, and it all only summed one cell or not the set i needed
Upvotes: 0
Views: 70
Reputation: 333
Extracting answer out of comments to allow this to be marked as answer:
Assuming in your image up top the first 0 is in A1, paste this in B1 and copy to end:
=IF(A1=1,IF(A2=3,SUM(A1:A4),IF(A2=4,SUM(A1:A3),"")),"")
Moderator: Not sure the correct way to handle this otherwise so it doesn't come up as 'unanswered'.
Upvotes: 0