Code assumes that formula whose result starts with # indicates error. Change to check entire result against error list in Functions.