Sum of last 10 entries greater than zero

jaespera

New Member
Joined
May 7, 2014
Messages
2
Hello, I've been searching for hours for a formula that will pull the last 10 entries in a column, but these entries would have to be greater than zero. Would really appreciate your help!
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Assuming the values are in column A, adjust these ranges to encompass as many rows as needed, be sure to leave the starting row at 1, this is an array formula:

=SUM(INDEX($A$1:$A$100, LARGE(IF($A$1:$A$100>0, ROW($A$1:$A$100), ""), 10)):INDEX($A$1:$A$100, LARGE(IF($A$1:$A$100>0, ROW($A$1:$A$100), ""), 1)))

...confirmed by pressing CTRL+SHIFT+ENTER to activate the array. You'll know the array is active when curly braces { } appear around your formula.
 
Upvote 0
Hello, I've been searching for hours for a formula that will pull the last 10 entries in a column, but these entries would have to be greater than zero. Would really appreciate your help!

A bit different approach:

1. If the nature of data is such that negative values cannot occur...

Control+shift+enter, not just enter:
Rich (BB code):
=SUM(IF(ROW(A1:A20)>=LARGE(IF(ISNUMBER(1/A1:A20),ROW(A1:A20)),
  MIN(COUNT(1/A1:A20),10)),A1:A20))

2. If negative values are bound to occur...

Control+shift+enter:
Rich (BB code):
=SUM(IF(ROW(A1:A20)>=LARGE(IF(ISNUMBER(1/A1:A20),IF(A1:A20>0,ROW(A1:A20))),
  MIN(COUNTIF(A1:A20,">0"),10)),IF(A1:A20>0,A1:A20)))
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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