How do I ensure that a value displayed in a cell does not exceed a set figure?