Ok guys, this should be easy, I've been trying to get it to work with
vlookup along with Max but I'm just either not getting the right
answer, or as soon as one of the conditions changes I get an error. I
need excel to be able to do this every time without an error.

Basically there are 5 of us using the one sheet. We all have a list of
tracking numbers. The tracking number is individual to the user, they
ascend by one every time a new entry is placed in the list. With
individual sheets this was simple enough for us to do, but we're trying
to get it down to just one shared sheet. As an example

AB 101
AB 102
DC 201
AB 103
EF 301
EF 302
DG 401
AB 104
DC 202

So if my next entry were AB, i need it to match the previous highest
value allocated to AB and add one, so it would be given the number 105,
if it were DC entered then 203 etc.