I'm a bit confused. I meant that you specify for each code in which warehouses it belongs in a separate table. According to this separate table the main table will be updated and there might be that code (N4963029) is in 0, central and regional or all warehouses together.

But if you want code (N4963029) to be in warehouse central in the beginning and in between in warehouse regiona + central then there is no logic VBA can build upon to automate the process.