Returning "Amount not found", makes the result a string and that will cause other problems down the line.
@andrew.abaye Welcome to AWF. As the others have mentioned there are at least two far better methods for handling this. Using a table is by far the best method but just simplifying the IIf() does a lot for readability. You have only two "outcomes" based on your original code