sum up column until dropdown is true

ddnndd1234

New Member
Joined
Oct 3, 2024
Messages
6
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
In column A i have a list of numbers, in column c there is a drop down of true and false. If the cell is true I would like the numbers at that cell and above to add up until the previous true cell in column B. The sum will be in column b beside the "true" cell. If false column stays blank
 

Attachments

  • Screenshot 2024-10-03 160219.jpg
    Screenshot 2024-10-03 160219.jpg
    18.2 KB · Views: 6

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Assuming your data is in columns A:C and starts in row 2 (row1 contains header) the formula for B2 (and copied down):
Excel Formula:
=IF(C2,SUM(A$2:A2)-SUM(B$1:B1),"")
(on screenshot there are semicolons in formula, but you probably need commas as separator (most of the world does).

1727988877612.png
 
Upvote 1
Solution
Please try this

Book2
ABC
21 FALSE
32 FALSE
436TRUE
54 FALSE
65 FALSE
76 FALSE
87 FALSE
98 FALSE
10939TRUE
1110 FALSE
1211 FALSE
1312 FALSE
1413 FALSE
1514 FALSE
1615 FALSE
1716 FALSE
1817 FALSE
1918 FALSE
2019145TRUE
Sheet7
Cell Formulas
RangeFormula
B2B2=IF(C2=TRUE,SUM(TAKE(A$2:A2,-(ROWS(A$2:A2)-IFERROR(XMATCH(TRUE,C1:C$2,0,-1),0)))),"")
B3:B20B3=IF(C3=TRUE,SUM(TAKE(A$2:A3,-(ROWS(A$2:A3)-IFERROR(XMATCH(TRUE,C$2:C2,0,-1),0)))),"")
Cells with Data Validation
CellAllowCriteria
C2:C20ListTrue,False
 
Upvote 0
Assuming your data is in columns A:C and starts in row 2 (row1 contains header) the formula for B2 (and copied down):
Excel Formula:
=IF(C2,SUM(A$2:A2)-SUM(B$1:B1),"")
(on screenshot there are semicolons in formula, but you probably need commas as separator (most of the world does).

View attachment 117671
You're a saint and a scholar, this works in excel. Now, you wouldn't know how to do this is google sheets as well?
 
Upvote 0
Please try this

Book2
ABC
21 FALSE
32 FALSE
436TRUE
54 FALSE
65 FALSE
76 FALSE
87 FALSE
98 FALSE
10939TRUE
1110 FALSE
1211 FALSE
1312 FALSE
1413 FALSE
1514 FALSE
1615 FALSE
1716 FALSE
1817 FALSE
1918 FALSE
2019145TRUE
Sheet7
Cell Formulas
RangeFormula
B2B2=IF(C2=TRUE,SUM(TAKE(A$2:A2,-(ROWS(A$2:A2)-IFERROR(XMATCH(TRUE,C1:C$2,0,-1),0)))),"")
B3:B20B3=IF(C3=TRUE,SUM(TAKE(A$2:A3,-(ROWS(A$2:A3)-IFERROR(XMATCH(TRUE,C$2:C2,0,-1),0)))),"")
Cells with Data Validation
CellAllowCriteria
C2:C20ListTrue,False
I could not get this to work, I got #NAME?
 
Upvote 0
You've not mentioned G.Sheets in first post, neither in profile.
So both answers were formated for Excel.
Jefrey's formula use TAKE function, which is available only in Excel 365 as I remember
 
Upvote 0

Forum statistics

Threads
1,224,816
Messages
6,181,139
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top