Digits inside numbers and applying formulas

Peggy1974

New Member
Joined
Apr 19, 2015
Messages
12
I have a series of numers like this in A1-A3:

976543
287530
296743

Now I want to calculate the combined average of the 3th, 4th and 5th digits in those numbers. So in this example that's the average of 654, 753 and 674 (693.6 in this example).
Right now I'm doing this in 2 steps: first =VALUE(MID(A1;3;3)) and dragging the fill handle down, then I'm calculating the average of the combined results.
I wonder if there's one single formula to calculate all of this.

Sorry for what is probably a dumb and obvious question ;)
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
This unfortunatly seems to give me a "formula" error. Doesn't "MID" convert automatically numbers to text? Maybe has something to do with that.
 
Upvote 0
I get

Code:
[TABLE="width: 95"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD="align: right"]976543[/TD]
[TD="align: right"]693.7[/TD]
[/TR]
[TR]
[TD="align: right"]287530[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]296743[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Looks like you need semi-colon separators for your region, try this version of gaz's suggested formula

=SUMPRODUCT(MID(A1:A3;3;3)/COUNT(A1:A3))

You could also use AVERAGE like this:

=AVERAGE(MID(A1:A3;3;3)+0)

...but that latter formula needs to be confirmed with CTRL+SHIFT+ENTER so that curly braces appear around the formula in the formula bar
 
Upvote 0
Thanks Barry, I missed that! Is the array option better? I wasn't sure which one to suggest, so went with the none array?
 
Upvote 0
Another question expanding on the previous example. What if I want to calculate the average of the literal reverse of those numbers. So instead of 654, 753 and 674 this becomes the average of 456, 357 and 476 in the example above.
Is it still possible to do the whole exercise (so from the beginning in the opening post) in one single formula? Thanks in advance for the help. :)
 
Upvote 0
Try

=SUMPRODUCT((MID(A1:A3;5;1)&MID(A1:A3;4;1)&MID(A1:A3;3;1))/COUNT(A1:A3))

Also, in answer to your comment about mid converting numbers to text, this is correct but, by adding (or dividing etc)
a number it will convert it back to a number.
So your original formula
=VALUE(MID(A1;3;3)) could be amended to =MID(A1;3;3)+0

HTH

Gaz
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,377
Messages
6,124,598
Members
449,174
Latest member
chandan4057

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