Where is it erroring?

What do you think this line does?

[vba]
DEFtask = Application.WorksheetFunction.VLookup(Task, myrange, 1, False)
[/vba]

By looking up column 1, if it matches, all you will get is the same value you looked up.

The last bit is just bad syntax, will not, cannot work.