Sum Up the last 7 (n) numbers in a column ignoring the error

Status
Not open for further replies.

Arnefer1206

New Member
Joined
Nov 25, 2019
Messages
9
Office Version
  1. 2016
  2. 2013
  3. 2010
Platform
  1. Windows
Good Day!

Hope anyone could assist me

I have this data in column A

A1 - 5
A2 - 10
A3 -15
A4 - 9
A5 - 5
A6 - 7
A7 - 20
A8 - #N/A
A9 - 14
A10 - 4

I want to get the sum of the last 7 cell value containing numbers and ignoring the cell with error (#N/A)

The result must be 74 - adding up (A10, A9, A7, A5, A4, A3)
 
=IFERROR(AGGREGATE(9,6,INDEX(A:A,LARGE(IF(ISNUMBER(A1:A10),ROW(A1:A10)),7)):A10),"<7 numbers") array-entered

Haven't checked exhaustively, but looks as if it may be more robust, e.g. try #N/A in A2 instead of A8.

Sir Stephen

Could your spare me more

Its almost same with my sample data

A1 - Increased
A2 - Increased
A3 - Decreased
A4 - Decreased
A5 - Maintain
A6 - Increased
A7 - Increased
A8 - Increased
A9 - #N/A
A10 - #N/A
A11 - #N/A
A12 - Decreased
A13 - Decreased
A14 - #N/A
A15 - #N/A

I want to get the count of the last 8 cell value containing "Increased" or "Decreased" and ignoring the cell with error (#N/A)

The result must be

"Increased" - 3
"Decreased" - 4

The 8 cells to be counted are {A13, A12, A8, A7, A6, A5, A4, and A3} , ignoring the the cells {A15, A14, A11, A10 and A9} because it contains error (#N/A)
 
Upvote 0

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,214,940
Messages
6,122,352
Members
449,080
Latest member
Armadillos

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