Given the values you've described and the #VALUE! error result, I would check S13 carefully. Perhaps it contains an empty string?

Feel free to attach the workbook for us to see?