Since I don't have access to the add-in file, I copied the code (you should edit your post to put the code in code tags -- this forum can be strict about those kind of things) into a module and ran it from the file (I assume the code here is the same as is in the add-in). When I ran the UDF in this way, the UDF fails. I added a stop statement to the top of the UDF, and discovered that it aborts on the TempArray(I,J)=ActiveSheet.Range(... statement. Looking at the variables just before that statement, I see that StrE and StrD are both empty, so this statement fails.
I'm not sure what this statement is trying to do. I would have expected this statement to be looking at the arrays/ranges that were passed to the UDF -- not trying to go back to the spreadsheet for additional information. Before we can worry about how the UDF output is interacting with the MMULT() functions, we need to get a valid output from the UDF, which, I'm hoping, just means figuring out what that statement is supposed to be doing and then correcting it.
Bookmarks