So here is my sample Data:
Arr StarP:
2141865 16
2141865 17
2141865 17
2141865 16
2141865 17
2141865 20
2141865 9
2141865 7
2141865 19
2141865 18
2141865 19
2141865 9
2141865 9
2141865 9
2141865 9
Arr medians:
2141865 16
The goal is to compare Arr StarP to Arr medians and find if any value with a corresponding ID (2141865) in Arr StarP is within a certain range of the value for that ID in Arr medians (if it is 1.5* larger or 1.5* smaller), and if it is not then it needs to be multiplied or divided by 1.5. If the value of Arr StarP is 2* larger or smaller than Arr medians then I want that value ignored in the new average calculation.
Example Output:
2141865 14.00666667
P.S. The real size of Arr B is 198x2 and Arr