Surely this is not really what Excel should be used for. Have you not got Access or another database type software?