I wouldn’t format the actual variable value, you couldn’t calculate with their values later on. Wouldn’t it better to just format the text in the fields? Inline variable replacement may be difficult here.
What is the correct answer to the question? You’re calculating the correct answer in the variable A7? As the values on the debit side are always bigger than the credit values, the correct answer would be: No entry in the left field and the value of A7 in the right?