I have a bill of material in which some parts are repeated in multi level usage (say the part nos listed in column a) and other columns has data corresponding to that part number. as given below

A B C D E F

1 XX 1A 2A 3A 4A 5A
2 YY 1b 2b 3b 4b 5b
3 ZZ 1c 2c 3c 4c 5c
4 XX

I need a macro that will identify if the same material like cell value of a1 and a4 are equal, if so it has to give same values b1 to f1 in b4 to f4 and also lock b4 to f4 for editing. if not leave the original entered values as it is and unlock for editing