Forgot to mention that the paint code won't necessarily be a good match, there can be several variants to each individual paint code, there can be 4 or more and they're often quite different.
It's really important to check which variant your car is in by using chips which a decent trade paint supplier will do for you free of charge when you buy your rattle cans. They'll mix them up to the formula for that particular variant. These spray cans will be double the price of Halfords or whoever but they will be as close as you'll get rather than in the prime shade (not to be confused with primer). Hope that's of some help :-)