I am having a problem with an Excel model which is crashing when I run my code because a formula is not evaluating properly and is resulting in the value #NA.
I use some code to enter a formula in a series of cells. It uses a couple of vlookups to form a string value that I will use for a http link. When I run my main processing code I get an error at some point in the execution that reads the values in these calls. When I view the worksheet cells were this formula is I see the values #NA. My code is unable to proceed so I kill it. When I do this the cells suddenly display the values I want. This is so annoying and I am stuck.
I have tried copying the formula as values to the cells but this makes no difference.
I have tried to recalculate the worksheet but this made no difference.
I have seen other posts were people complain about the formula not evaluating and just displaying the formula as text but this is not quite that case, and I have not seen any posts like mine before. any advice is greatly appreciated.
I use some code to enter a formula in a series of cells. It uses a couple of vlookups to form a string value that I will use for a http link. When I run my main processing code I get an error at some point in the execution that reads the values in these calls. When I view the worksheet cells were this formula is I see the values #NA. My code is unable to proceed so I kill it. When I do this the cells suddenly display the values I want. This is so annoying and I am stuck.
I have tried copying the formula as values to the cells but this makes no difference.
I have tried to recalculate the worksheet but this made no difference.
I have seen other posts were people complain about the formula not evaluating and just displaying the formula as text but this is not quite that case, and I have not seen any posts like mine before. any advice is greatly appreciated.