is this possible? (Help automating table)

https://preview.redd.it/z1qspibzll5d1.png?width=1526&format=png&auto=webp&s=25d0518a5f8e6375b140a201d58d1d786e2dda4d

Hey everyone. i am trying to get the colroed bars of my table to automatically fill to the right column. For example if production ends in 2030 then fill to the 2030 mark using the right color. That way, anytime a new line of data is entered, excel will autofill the color for the user. The colors are based off the product id, so yellow is product 1 regardless of what year production ends and so on and so forth. This isn't the original data set ofc.

i think this could be done with conditional formatting but I could not get it work, tried ChatGPT solutions as well and that didn't work. So my questions are ...

  1. Is this possible?
  2. If so how?
  3. Is there a better method that using a color fill to create this visual?

The purpose is to easily visualzie when certain products are ending, again this isnt the original data table which is much more in depth, but this is the part I need to automate. Thanks!