I've looked at your workbook but can't follow what data you are inserting and the logic which should follow. Can you explain further? Can an ID number appear more than once in sheets 1-4? If not, how do you handle this?