I have a UDF on a main sheet with about 5k rows that takes the name from another cell on the same row - removes some characters (middle initial, etc) and displays everyone's name in a particular format <lastname>, <First Name>.
I have some VB that runs on the same sheet and looks to that cell where the UDF is. Specifically it is this.
That pops an immediate Error 13 - type mismatch (avarsplit is declared as Variant)
When I'm stepping through the VBA line by line it has no problems until it gets to that particular line on avarsplit - then it tosses the Type Mismatch error and all of the fields in the column that holds the UDF changes to #VALUE! Sometimes the debug window switches to the UDF module.
Either way there's no way to get back the values unless i totally exit out of excel and reopen - and then it'll just toss the #VALUE! again. Has anyone run into this before?
For reference my UDF is this
I recently added the on error resume next and the application.volatile.
Bookmarks