Hi
I am having an annoying problem that I cant solve. When I use Trim(cell.value) on a cell that contains #N/A the macro stops with runtime error 13.
The #N/A value is a result of a vlookup. All the vlookup values are copied and pastespecial. The trim is then run on these cells.
I have On Error Resume Next built in but this only works as long as the first cell that the code tries to trim is not #N/A.
Attachment 261742
See attached trimerror excel file
Any help would be welcome.
Bookmarks