average fill

leecavturbo

Well-known Member
Joined
Jan 4, 2008
Messages
681
if I have value 1 in A1 and value 4 in A4; A2 should equal 2 and A3 should equal 3.
 
I get problems with that if the start and end value are close like 103 and 107 with 20 cells in between or generally with larger numbers!

same formula but not the result I expected

970
1094.875
1219.75
1344.625
1469.5
1594.375
1719.25
999
 
Upvote 0

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
You need to take the start value from the end value, then divide by the number of cells, excluding the 1st one.

Code:
[TABLE="width: 65"]
<!--StartFragment--> <colgroup><col width="65" style="width:65pt"> </colgroup><tbody>[TR]
  [TD="width: 65, align: right"]970[/TD]
 [/TR]
 [TR]
  [TD="class: xl63, align: right"]974[/TD]
 [/TR]
 [TR]
  [TD="class: xl63, align: right"]978[/TD]
 [/TR]
 [TR]
  [TD="class: xl63, align: right"]982[/TD]
 [/TR]
 [TR]
  [TD="class: xl63, align: right"]987[/TD]
 [/TR]
 [TR]
  [TD="class: xl63, align: right"]991[/TD]
 [/TR]
 [TR]
  [TD="class: xl63, align: right"]995[/TD]
 [/TR]
 [TR]
  [TD="align: right"]999[/TD]
 [/TR]
<!--EndFragment--></tbody>[/TABLE]

=(($A$8-$A$1)/(ROW($A$8)-ROW($A$1))+$A1)
 
Upvote 0

Forum statistics

Threads
1,215,419
Messages
6,124,798
Members
449,189
Latest member
kristinh

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