the cells have a number associated with it which looks something like this ,column A & B will never have any color the columns and rows are dynamic

the Output is expected something like the below. the green columns B-C should only be populated when the whole line is green
and only first red cell and its value should be populated in the red column D-F

can you please help with the code modifications required above link.
Redirecting
the Output is expected something like the below. the green columns B-C should only be populated when the whole line is green
and only first red cell and its value should be populated in the red column D-F
can you please help with the code modifications required above link.
Redirecting