I would add a column to the "master leads" and enter the "territory code" there. That can occur via a formula of some kind, or simply enter the agent. The entries in this column work best if they match the names of the other sheets exactly.

Then, here's a macro for parsing rows of data from one sheet to many sheets named for the same values in a specific column.It not only can parse the rows, it can create the sheets if they are missing. There is a sample sheet there where you can test this out. Just edit the macro so the vCol variable points to the correct column where you put in the agent codes. Also edit the ws variable sheetname from "data" to "Master Leads".

It should work at that point.