in reply to ole problem

The problem is that UsedRange->Find() returns a hashref which you immediately dereference with ->{'Column'}. But it only does that if the search finds something. If it doesn't, it returns undef, so the deref breaks. You should test the value returned from UsedRange->Find() before you try to dereference it.