Thanks Geoff.
Basically I have a spreadsheet with 1000's of lines in, and the function in each of the lines is...
=IF(W4="A",IF(ABS(IF(AND(X4<VLOOKUP(J4,data,3,FALSE),(X4/0.84)<=VLOOKUP(J4,
data,3,FALSE),(X4/0.8)>=VLOOKUP(J4,data,3,FALSE)),X4/0.9,IF(AND(X4<VLOOKUP...