Hi Pecoflyer
Thank you for your reply, it is much appreciated. I have used the sumif function, which I have never used before. This gives me the result I need. I am struggling a bit with pivot tables as I have never used them before. I need to spend some time reading up on this and trying to work it out. I am sure this will be a lot easier once I know how to use it.
Thanks again. Have a good christmas