you say your data is in A7:L1042 i presume a whole row say a2:l20 is what would be highlited in yellow ?
then in
say M7 put =getcolour(a7) fill down to M1042 [note you cant put a range like =getcolor(a7:b20)]