Two thoughts.
First, you might have better luck in the office VBA forum because people there are more likely to use Excel and VBA. Are you automating Excel? If not, you will have to.
Secondly, Why? Surely any calculation you are doing in Excel you can do in Access. The test in Access is likely far simpler. Even so, you may be able to find what data gives you #value (probably a null or zero length string somewhere) and test for it before you send the data to Excel.