ZerglingPack

New Member
Joined
May 11, 2018
Messages
6
I've been tasked with creating a spread sheet that will show a running total, but I'm not sure where to start.
AmountTotal
1
2
3
x
6
1
2
6
4
5
x
18

<tbody>
</tbody>

It started out simple enough, enter amounts on the left and a cell on the right would show the total. My problem is that the boss wants to be able to put an X (or any simple way) and it would total the numbers after the previous X. The big issue is that the "amount" column doesn't have a specific amount of cells before needing a total. It could be as few as two amounts or up to fifty before the next X. Any suggestions or solutions would be greatly appreciated.
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
NVM I'm blind. Thank you very much Steve! Do you know how I could make it so the totals are directly under each other instead of spaced out?
 
Upvote 0
I cant think of a way to do that. There may be one but not one that immediately springs to mind using formulas.
 
Upvote 0
Actually this array formula should work. Enter it CTRL-SHIFT-ENTER not just ENTER. In B2 and copy down:

=IFERROR(SUM($A$1:INDEX($A$1:$A$1000,SMALL(IF($A$2:$A$1000="x",ROW($A$2:$A$1000)),ROWS($A$1:A1))))-SUM($B$1:B1),"")
 
Upvote 0
Actually this array formula should work. Enter it CTRL-SHIFT-ENTER not just ENTER. In B2 and copy down:

=IFERROR(SUM($A$1:INDEX($A$1:$A$1000,SMALL(IF($A$2:$A$1000="x",ROW($A$2:$A$1000)),ROWS($A$1:A1))))-SUM($B$1:B1),"")



This is exactly what I am looking for, you are amazing! I'm not even sure what the formula means, but it's doing exactly what my boss wants. Thank you for everything.
 
Upvote 0
Would this non-array formula achieve your target? Assuming your numbers in column A & the totals should appear in column B

=IF(A2="x",SUM($A$1:A2)-SUM($B$1:B1),"")
 
Upvote 0
MSE330 that was close to what I was looking for, but the Array that Steve posted was nearly exactly what I thought the boss wanted. Is it possible to have the numbers between the X added to the next set? Basically he wanted the X as a quick way of moving the information to another cell, but the amounts between each x should be added to the previous set of numbers. Is that possible?
 
Upvote 0
I was able to figure it out, I just removed -sum, but now my question is how would I add multiple columns for the numbers I input? The total would still be in one column, but lets say I wanted to input numbers in column A and B with the total moving to C.
 
Upvote 0

Forum statistics

Threads
1,216,474
Messages
6,130,841
Members
449,598
Latest member
sunny_ksy

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