Averaging of Scientific Results in Excel

Each scientific measurement process has its own criteria for what is acceptable data. However, there are some general rules. If a data point is suspect, another is generated. If these are within the statistical variation for that process, then they are averaged. However, if a 3rd measurement is needed,

An Excel formula that correctly handles all of these requirements is needed. If 2 of the measurements are within statistical variation, they are averaged. This would be the two closest values.

But if two measurements are equidistant from the 3rd, (13.2,13.5,13.8) then all 3 values

must be averaged.

So, given those requirements, the following formula will return the correct result.




First, if the 3 values are all different, then

=SUM(MATCH($A$1:$C$1,$A$1:$C$1,0))=6 is True.

So, if SUM(MATCH($A$1:$C$1,$A$1:$C$1,0))<6,then the formula uses


In the comments at this site:


a poster in the comments named Ihm came up with this formula.

In the FALSE condition of the formula is the following:


It is based on a 3×3 matrix obtained from


For a data set of

13.4 13.55 13.8

The following matrix is


The ROUND function is necessary since the ABS function sometimes introduces differences (i.e. – 0.25 vs 0.2499999999).

The 5th largest value in the matrix corresponds to the smallest difference. The values for those differences in A1:C1 are averaged to afford the desired result.



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s