This revised version worked perfectly!! You have saved me what would have otherwise been many many hours of tedious manual data manipulation. Thank you for your generous and incredibly speedy assistance.