I have a master table that feeds 4 types of codes and sub-tables for each code. I would want a dynamic formula for each sub-table in such a way that whatever new code is entered in the master table, the formula will automatically add the new entry to the corresponding sub-table.

Example:
If I enter code A next to code B in the master table, the new code will display under sub-table A along with its info1 and info2 entries.

[![enter image description here](https://i.stack.imgur.com/4fqc6.jpg)](https://i.stack.imgur.com/4fqc6.jpg)

I am not a native English speaker so I hope my explanation didn't complicate things. :)

Note: The tables aren't limited to three columns.