Trimmean If without array

Ruca13

Board Regular
Joined
Oct 13, 2016
Messages
85
Hi everyone.

Does anyone have any idea how I can bypass the problem of using an array formula when I use the trimmean with criteria?

The excel is already extremely slow and the array just blocks it completely

Thanks,

Rui
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Please post a concise example of your challenge and the expected result.
 
Upvote 0
Thank you for your reply

Dropbox - Capturar.PNG

I have trimmean to exclude 15% of the outliers.

The formula reads like this:

{=TRIMMEAN(IF((L:L=L9)*(AE:AE<>0),AE:AE),0.15)}

It has the expected result but I need and alternative.

Unfortunately I cannot have to run with arrays (I have not calculated the worksheet, just those cells where I applied trimmean), because the file is already loaded with formulas and has more than 5k rows.

Thank you
 
Upvote 0
You did not post an example.

Try your formula with only the relevant rows for example L2:L500.

You could look at Aggregate or other functions but excluding the 15% would complicate the formula.
 
Last edited:
Upvote 0
I have data like i show below, where as you can see, some values are way too high, and others too low. I want to exclude those.

For that my idea was to do a mean were I can exclude outliers, and if a value x times higher or x times lower than that mean I calculated, it would be excluded.

I need it to depend on the 1st column, and I also excluded zero.

The 15% are just an example, I will define a value but for now it isn't decisive for me.

I do not think I can make it clearer than this.

[TABLE="width: 154"]
<tbody>[TR]
[TD]LFMN[/TD]
[TD] 0.0826[/TD]
[/TR]
[TR]
[TD] LFMN[/TD]
[TD] 0.0834[/TD]
[/TR]
[TR]
[TD] LFMN[/TD]
[TD] 0.0829[/TD]
[/TR]
[TR]
[TD] LFMN[/TD]
[TD] 0.0826[/TD]
[/TR]
[TR]
[TD] LFMN[/TD]
[TD] 0.0834[/TD]
[/TR]
[TR]
[TD] LFMN[/TD]
[TD] 0.1305[/TD]
[/TR]
[TR]
[TD] LFMN[/TD]
[TD] 0.3058[/TD]
[/TR]
[TR]
[TD] LFMN[/TD]
[TD] 0.0452[/TD]
[/TR]
[TR]
[TD] LFMN[/TD]
[TD] 0.2625[/TD]
[/TR]
[TR]
[TD] LFMN[/TD]
[TD] 0.2640[/TD]
[/TR]
[TR]
[TD] LFMN[/TD]
[TD] 0.6166[/TD]
[/TR]
[TR]
[TD] LFMN[/TD]
[TD] 0.2887[/TD]
[/TR]
[TR]
[TD] LFMN[/TD]
[TD] 0.0853[/TD]
[/TR]
[TR]
[TD] LFMN[/TD]
[TD] -[/TD]
[/TR]
[TR]
[TD] LFMN[/TD]
[TD] 0.0792[/TD]
[/TR]
[TR]
[TD] LFMN[/TD]
[TD] 0.0854[/TD]
[/TR]
[TR]
[TD] LFMN[/TD]
[TD] 0.0386[/TD]
[/TR]
[TR]
[TD] LFMN[/TD]
[TD] 0.4018[/TD]
[/TR]
[TR]
[TD] LFMN[/TD]
[TD] 0.0853[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
2 thoughts that may help.


Excel 2010
ABCDE
8Helper
9LFMN0.08260.1530381
10LFMN0.08340.1530381
11LFMN0.08291
12LFMN0.08261
13LFMN0.08341
14LFMN0.13051
15LFMN0.30581
16LFMN0.04521
17LFMN0.26251
18LFMN0.2641
19LFMN0.61661
20LFMN0.28871
21LFMN0.08531
22LFMN00
23LFMN0.07921
24LFMN0.08541
25LFMN0.03861
26LFMN0.40181
27LFMN0.08531
28
8a
Cell Formulas
RangeFormula
E9=(A9=A9)*(B9<>0)
C9{=TRIMMEAN(IF((A9:A50=A9)*(B9:B50<>0),B9:B50),0.15)}
C10{=TRIMMEAN(IF((E9:E50=1),B9:B50),0.15)}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Last edited:
Upvote 0
While I appreciate the time and effort you took, I think I will not use your solution, since I stated I want to avoid array formulas.

Regarding your answer, that would only work if column 1 was always the same. In the link I show that isn't the case. That won't be reflected in the C10 formula as it is in C9.
 
Upvote 0
The suggestions use a range of rows that include the data; full column references
can be resource intensive.

The formula in C9 would be copied or filled down and then converted to value.
The array formula C10 uses less resources.
 
Upvote 0
Unfortunately the best I could do was indeed paste as values after calculate (I calculate only that part of the sheet using a very small macro).

I have adapted the ranges and added some include/exclude controls to have other formulas run quicker.
I guess there really isn't an alternative to using an array in Trimmean.

Thank you for your replies.
 
Upvote 0
My message was not clear.
The Formula in C10 uses less resources.
The Helper column assembles some of the criteria E9 =(A9=A9)*(B9<>0)
The helper column can be easily converted to a value 1 or 0.

With the suggestions, hopefully the array formula will work.

A non array formula could be built but it would be complicated and it might use lots of resources as well.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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