Hi pjotrsk,

Welcome to ExcelFox !

Please use code tags while posting codes

It's better to stick with native excel functions whenever possible.