Formula to exclude first two values

BiggusDoggus

Board Regular
Joined
Jul 7, 2014
Messages
91
Office Version
  1. 365
Platform
  1. Windows
Hi all

So I have a table of data (example below - consider the table as starting in A1):

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]Jan[/TD]
[TD]Feb[/TD]
[TD]Mar[/TD]
[TD]Apr[/TD]
[TD]May[/TD]
[TD]Jun[/TD]
[/TR]
[TR]
[TD]Z Ltd[/TD]
[TD]36[/TD]
[TD]24[/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD]6[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]Y Ltd[/TD]
[TD][/TD]
[TD][/TD]
[TD]32[/TD]
[TD]31[/TD]
[TD]2[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]Z Ltd[/TD]
[TD][/TD]
[TD]43[/TD]
[TD]35[/TD]
[TD]4[/TD]
[TD]3[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]A Ltd[/TD]
[TD]9[/TD]
[TD]10[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]1[/TD]
[/TR]
</tbody>[/TABLE]

What I would like please is a formula that takes either the sum or average (doesn't matter which) for each row, but excluding the first 2 values. In essence, the first 2 numbers are during a trial period, so only want to look at the numbers after the first two months for each company.

I could do this manually, except my actual table is quite large, and is updated regularly.

Is it possible please?
 
Thanks for all the help guys - went with

=SUM(IF(COLUMN(B2:G2)<=SMALL(IF(ISNUMBER(B2:G2),COLUMN(B2:G2)),2),B2:G2))

Works great.

Hi again. Sorry, slight modification. I need to get up to the first 2 numbers please. So if there is only 1, include that one. And if there's 2, sum the 2. The above formula errors out if there's less than 2 values.

Thanks!
 
Upvote 0

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Hi again. Sorry, slight modification. I need to get up to the first 2 numbers please. So if there is only 1, include that one. And if there's 2, sum the 2. The above formula errors out if there's less than 2 values.

Thanks!

Control+shift+enter, not just enter:

=SUM(IF(COLUMN(B2:G2)<=SMALL(IF(ISNUMBER(B2:G2),COLUMN(B2:G2)),MIN(2,COUNT(B2:G2))),B2:G2))

Even...

=IFERROR(SUM(IF(COLUMN(B2:G2)<=SMALL(IF(ISNUMBER(B2:G2),COLUMN(B2:G2)),MIN(2,COUNT(B2:G2))),B2:G2)),"no data")
 
Upvote 0
Control+shift+enter, not just enter:

=SUM(IF(COLUMN(B2:G2)<=SMALL(IF(ISNUMBER(B2:G2),COLUMN(B2:G2)),MIN(2,COUNT(B2:G2))),B2:G2))

Even...

=IFERROR(SUM(IF(COLUMN(B2:G2)<=SMALL(IF(ISNUMBER(B2:G2),COLUMN(B2:G2)),MIN(2,COUNT(B2:G2))),B2:G2)),"no data")

Perfect, thank you!!
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
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