Copy content within a group from first to last row

Hi everyone,

I have a dataset of different variables. Each variable consists of several rows. The first row of each variable contains the respective variable name in the first column. Sometimes a variable contains a row (usually the last or second to last) indicating the need for an expression. The indicator (-) is in the fourth column. Unfortunately the matching expression in column five ends up in the first row of the respective variable.

Is there any way to move or copy that expression in column five into the right row i.e. next to the indicator? I had thought about GroupBy or Group Loop nodes but can’t find a solution that keeps the table structure the same. If it is a problem that the indicator sometimes is not in the last column then I could change that in advance.

Any help is appreciated.
Marina

test_data.xlsx