Sum variable range

SimonHughes

Active Member
Joined
Sep 16, 2009
Messages
452
Office Version
  1. 365
Platform
  1. Windows
Hello, I would like to sum values in column A depending if I want o sum the top 10 or 20 etc. There would be an input cell, C2 where you could enter 10 and then the first 10 values in column A would be added, changing the input cell to 15 would add the top 15 values and so on. Any help appreciated. Data would start in cell A2. I am using Excel 2010
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Hi All, I meant the highest values Davey. The formula from Brian is not working (may be a cell reference thing??) but the one from Jamcall is. Many thanks for taking the time to reply and help out appreciated.
 
Upvote 0
Hi All, I meant the highest values Davey. The formula from Brian is not working (may be a cell reference thing??) but the one from Jamcall is. Many thanks for taking the time to reply and help out appreciated.

Glad it helped... That works if your data is sorted (hi to lo). If you just wanted highest values without sorting (as I think Davey was alluding to) you could use something like:

{=SUM(LARGE(A:A,ROW(INDIRECT("A1:A"&C2))))}

- array formula, enter with Ctrl-Shift-Enter

You could adjust A:A to fit the range of your data as needed.

Cheers,
~ Jim
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,485
Members
448,967
Latest member
visheshkotha

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