I have this table, which can be seen as a basic custom gantt chart:
And I would like to fil
In A2 try this formula copied down
=IF(COUNTA(B2:Z2),INDEX(B$1:Z$1,MATCH(TRUE,INDEX(B2:Z2<>"",0),0)),"")
you may have to format column A with the required date format
assumes data up to column Z, adjust as required