Modify cells meeting some criteria
Modify cells meeting some criteria
(OP)
Is there a way to set all entries of the matrix which meet a given criteria to an arbitrary value?
I've got a distance matrix and want to set all cells with values greater than some threshold to NaN for graphing purposes. What I do now is a double loop but is there any function or trick which can do it for me?
I've got a distance matrix and want to set all cells with values greater than some threshold to NaN for graphing purposes. What I do now is a double loop but is there any function or trick which can do it for me?





RE: Modify cells meeting some criteria
Two ways
1 - embedded with your normal formula:
=+if(NormalFormula<threshhold,NormalFormula,1E99)
2 - in a different sheet, referring to a cell in the original sheet that contains the formula:
i.e. in sheet 2 cell C3
=+IF(sheet1!C3<threshhold,sheet1!C3,1E99)
=====================================
Eng-tips forums: The best place on the web for engineering discussions.
RE: Modify cells meeting some criteria