Good morning (from British Columbia)
I am doing a very simple interpolation:
First I check for wild discrepencies, and if found I do the interpolation:
Works fine except that I end up with a rounded number. For example, I had 13.9 and 13.45 in the offsets and I ended up with 14 in the active cell.
If I just run:
it works fine!
Thanks,
David
I am doing a very simple interpolation:
First I check for wild discrepencies, and if found I do the interpolation:
Code:
Dim x as integer
Dim y as integer
Dim a as integer
x = ActiveCell.Value
y = (ActiveCell.Offset(1,0).Value + ActiveCell.Offset(-1,0).Value ) / 2
a = Abs(x - y) / y
If a > 0.1 The ActiveCell.Value = y
If I just run:
Code:
ActiveCell.Value = (ActiveCell.Offset(1,0).Value + ActiveCell.Offset(-1,0).Value ) / 2
Thanks,
David