Hello guys, I'm having trouble by doing something.

Imagine I got 4 columns (col1, col2,col3,col4)

I'm bad at explanation so a screen will be easier :

I would like a 5th column, who gives me, as an example here, 1000(col4) , split by every A (col2), and the split depend on the col3 (250,144,18) as proportion of 1000.

So col5 would be something like 600, 346,44 for the first three rows

forgot to add that col2 A will always correspond with col4 1000

every time there is an "A" at col2, col4 will always be "1000"

I'm having trouble searching on this forum because I don't know how to write my problem.

Thanks you !