Change operater in Excel formula

  • Thread starter Thread starter H.G. Lamy
  • Start date Start date
H

H.G. Lamy

Hello,

depending on a certain circumstances, a formula must change from "X = Y" to
"X <> Y".
Can this be done (e.g. using "if", or otherwise) ?
Thank you in advance.
Merry Christmas,

H.G. Lamy
 
You didn't give us a lot to work with, but I think you are looking for
something like this...

=IF(<<your condition>>,<<formula with x=y>>,<<formula with x<>y>>)
 
As an alternative, if "the formula" is very long, you may try this:

<< your formula with X=Y replaced with (((X<>Y)+your condition)=1) >>

Hope this helps / Lars-Åke
 
Since my formula is already quite long and complicated, I'd like to avoid
repeating most of it (once for the "if"-part, and again for the
"then"-part).

Instead, I was trying to REPLACE ONLY THE OPERATOR INSIDE THE FORMULA ("=",
or "<>", respectively), depending on the condition met.

However, I did not find a workable solution for that.

Can anybody assist ?

Thank you in advance!

Kind regards,

H.G. Lamy
 
Back
Top