Sum of cell range by manual option...

Aaron DOJ

New Member
Joined
Aug 10, 2018
Messages
36
Office Version
  1. 365
Platform
  1. Windows
Hello,
I want to be able to manually change the "Count" and depending on that number, a formula in "Total" will display the sum results from the top down within Column L. My range is L4;L18.

J K L
4 blah blah 175.00
5 blah blah 175.00
6 blah blah 50.00
Count: 2
Total: 400.00
In the case of the above is a perfect example of what I don't want to happen :mad:, I want the Total to display 350 because I chose Count 2, not Total of 400.

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Just in case...the below is an example of what I do want to have happen :):
J K L
4 blah blah 100.00
5 blah blah 125.00
6 blah blah 150.00
7 blah blah 50.00
8 blah blah 100.00
9 blah blah 50.00
Count: 4
Total: 425
I am not sure if I am just over thinking this or if its because Monday, but I can't seem to think of the solution.

Thank you for your time and thoughts!
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
[Table="width:, class:grid"][tr][td="bgcolor:#C0C0C0"][/td][td="bgcolor:#C0C0C0"]
K​
[/td][td="bgcolor:#C0C0C0"]
L​
[/td][td="bgcolor:#C0C0C0"]
M​
[/td][td="bgcolor:#C0C0C0"]
N​
[/td][/tr][tr][td="bgcolor:#C0C0C0"]
4​
[/td][td]blah[/td][td]blah[/td][td]
100​
[/td][td][/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
5​
[/td][td]blah[/td][td]blah[/td][td]
125​
[/td][td][/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
6​
[/td][td]blah[/td][td]blah[/td][td]
150​
[/td][td][/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
7​
[/td][td]blah[/td][td]blah[/td][td]
50​
[/td][td][/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
8​
[/td][td]blah[/td][td]blah[/td][td]
100​
[/td][td][/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
9​
[/td][td]blah[/td][td]blah[/td][td]
50​
[/td][td][/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
10​
[/td][td][/td][td]Count:[/td][td]
4​
[/td][td][/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
11​
[/td][td][/td][td]Total:[/td][td="bgcolor:#CCFFCC"]
425​
[/td][td="bgcolor:#CCFFCC"]M11: =SUM(M4:INDEX(M:M, ROW(M4) + M10 - 1))[/td][/tr]
[/table]


That's the sum of the first four items.
 
Upvote 0
Hi,

This would also work:


Book1
LMN
3CountSum
41004425
5125
6150
750
8100
950
Sheet237
Cell Formulas
RangeFormula
N4=SUM(L4:INDEX(L4:L9,M4))


Change/adjust cell references/range to suit your data.
 
Last edited:
Upvote 0
Perfect SHG,

Thank you...I had to change it to =SUM(L4:INDEX(L:L, ROW(L4) + L20 - 1)) but works like a charm!!
 
Upvote 0
Did you try my simpler version formula in Post # 3?

Here, adjusted to your cell references:


Book1
LM
3Sum
4100425
5125
6150
750
8100
950
10
19
204
Sheet237
Cell Formulas
RangeFormula
M4=SUM(L4:INDEX(L4:L18,L20))
 
Upvote 0

Forum statistics

Threads
1,224,825
Messages
6,181,190
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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