The system works on a slot value idea, so rather than having different addresses pointing at different units, they have the addresses pointed at the slots that the unit-type/units are in.
Say for example you have this party:
SLOT1: Infantry dudes 20
SLOT2: Heavy Infantry dudes 20
SLOT3: Cavalry dudes 10
And you want to get some more infantry dudes. You can scan for 20 in a memory editor, and find all values which are 20, then lose one of your infantry guys, so you get:
SLOT1: Infantry dudes 19
SLOT2: Heavy Infantry dudes 20
SLOT3: Cavalry dudes 10
Then search for 19, and keep going until you've got one address left, it's usually after 3 or 4 tries. This address will point to the value of slot 1, so if swap another unit into slot 1, the address will point at them instead.
Edit this value to what number of infantry dudes you want, close the party window and open it to refresh it, and see how many you have.
SLOT1: Infantry dudes 300
SLOT2: Heavy Infantry dudes 20
SLOT3: Cavalry dudes 10
------------------
Then, if you want to get 300 Cavalry guys, just move them up the slots (You can do this ingame with the group order buttons), so when the cav is in the first slot:
SLOT1: Cavalry dudes 10
SLOT2: Heavy Infantry dudes 20
SLOT3: Infantry dudes 300
Automatically, in your memory editor you have should change to the number of slot 1, so it will be 10 in this example, so if you change that:
SLOT1: Cavalry dudes 300
SLOT2: Heavy Infantry dudes 20
SLOT3: Infantry dudes 300
It changes the amount of units in slot 1.
Simple!