-1

I have IIf expression given below. Normally it works the way I want, but It gives an error when I do not enter appropriate numeric data. So, I want it to be blank or symbol, etc. when I do not enter a suitable value for the calculation. Many many thanks for your answers.

=IIf(Mid([EBGA];4;1)="/";IIf(Abs(Mid([EBGA];1;3)-400)>Abs(Mid([EBGA];5;3)-400);Format([KA1]/Mid([EBA1];InStr([EBA1];"/")+1;10);"Fixed");Format([KA1]/Mid([EBA1];1;InStr([EBA1];"/")-1);"Fixed"));Format([KA1]/[EBA1];"Fixed"))
June7
  • 19,874
  • 8
  • 24
  • 34

1 Answers1

0

If InStr() returns Null, Mid() will error because its position arguments must be numeric. If field used by InStr() is Null, InStr() returns Null. Handle possibility of Null.

InStr(Nz([EBA1], ""), "/")

Arithmetic with Null will return Null.

June7
  • 19,874
  • 8
  • 24
  • 34