Some further pointers for better coding:

Do use Dim variables. I don't understand why you had commented them out
Don't use On Error Resume Next
unless there is good reason (such as when testing if file is open). If you do use it cancel it as quickly as possible when it is no longer required (On Error goto 0)
Don't use variable names or sub / function names which are similar or the same as Excel function names. Your sub was called match(). So how can you start confusing Excel and yourself more?