A formula like this can do it, but will take some time for 10000 rows.

Sheet2 J2 copied down.

```
=IF(ABS(G2)=125,IF(ISERROR(LOOKUP(2,1/(ABS($G$1:G1)=125),($J$1:J1))),125*IF(G2<0,0.9,1.25),IF(LOOKUP(2,1/(ABS($G$1:G1)=125),($J$1:J1))*IF(G2<0,0.9,1.25)>1000,125,IF(LOOKUP(2,1/(ABS($G$1:G1)=125),($J$1:J1))*IF(G2<0,0.9,1.25)<25,50,LOOKUP(2,1/(ABS($G$1:G1)=125),($J$1:J1))*IF(G2<0,0.9,1.25)))),"")
```

Another approach.With autofilter the values 125 and -125 in column G, are extracted and placed in column N.

The formula in M2 to get the result is much simpler and much more efficient, since the reference is only to cells left and above the formula.

```
=IF(ISTEXT(O1),125*IF(N2<0,0.9,1.25),IF(O1*IF(N2<0,0.9,1.25)>1000,125,IF(O1*IF(N2<0,0.9,1.25)<25,50,O1*IF(N2<0,0.9,1.25))))
```

Have reduced the number of rows with data to 500 on both sheets to reduce file size.

Fiddler-500-rows.xlsx