Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
sum up values at intervals
Hello!
What formula can I use in Col C in the example table below: Row# Col A Col B Col C 1 X 1 1 2 Y 2 2 3 Y 1 3 4 X 1 1 5 X 1 2 Col C sums up the values in Col B based on Col A: A1 = X therefore C1 sums B1:B1 to get "1" A2 = Y therefore C2 sums B2:B2 to get "2" A3 = Y. Since the row above is also "Y", C3 should sum B2:B3 to get "3" A4 = X. Since this "breaks" the series of "Y", C4 should restart the summing from this row, i.e. B4:B4 to get "1" A5 = X. Since the row above is also "X", C5 should sum C4:C5 to get "2" |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
sum up values at intervals
Melissa,
Put this in C1 =B1 and this in C2 =IF(A2=A1,B2+C1,B2) Drag C2 down as fae as required. Mike "Melissa" wrote: Hello! What formula can I use in Col C in the example table below: Row# Col A Col B Col C 1 X 1 1 2 Y 2 2 3 Y 1 3 4 X 1 1 5 X 1 2 Col C sums up the values in Col B based on Col A: A1 = X therefore C1 sums B1:B1 to get "1" A2 = Y therefore C2 sums B2:B2 to get "2" A3 = Y. Since the row above is also "Y", C3 should sum B2:B3 to get "3" A4 = X. Since this "breaks" the series of "Y", C4 should restart the summing from this row, i.e. B4:B4 to get "1" A5 = X. Since the row above is also "X", C5 should sum C4:C5 to get "2" |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Plotting average values against time intervals | Charts and Charting in Excel | |||
Count Intervals of 2 Consecutive Values in same Row and Return Count across Row | Excel Worksheet Functions | |||
assigning values by intervals | Excel Worksheet Functions | |||
Count Intervals of Filtered TEXT values in Column and Return Count across a Row | Excel Worksheet Functions | |||
Adding values for prior date intervals | Excel Worksheet Functions |