Wow. I didn't expect it will be so complicated script. However I found an error in extraction sheet, where B values with 0 in the front are disappeared:
I formatted entire sheet as text and after that B column values were shown correctly.
Thanks a lot!