THANK YOU!!!! I didn't even knew about =MAP and LAMBDA, this worked wonderfully!!!
=SUM(
MAP(D4:D; L4:L; W4:W;
LAMBDA(portion; neto; proportion;
IFERROR(
IF(proportion = ""; 1; INDEX(SPLIT(proportion; ";"); MATCH(Z3; SPLIT(portion; ";"); 0))) * neto;
0
)
)
)
)
This badboy got me the sum of every "L4:L" (NETO) where "D4:D" is "mz 22" (Z3) in the right proportion based on its position, "W4:W" (first positon in the first line), plus every other "mz 22" in the "D4:D".
=IFERROR(
INDEX(
SPLIT(IF(W4 = ""; "1"; W4); ";");
MATCH($Z$3; SPLIT(D4; ";"); 0)
) * L4;
""
)
I also added this formula for the individual line to get the NETO of the desired match "mz 22" (Z3)
Again, thanks a lot!!!
Edit: The "db 05;db 34;db 05" was a typo, the last "db 05" was suposed to be "db 07".