79545287

Date: 2025-03-30 23:55:12
Score: 1.5
Natty:
Report link

THANK YOU!!!! I didn't even knew about =MAP and LAMBDA, this worked wonderfully!!!

Sample

=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".

Reasons:
  • Blacklisted phrase (0.5): THANK YOU
  • Blacklisted phrase (0.5): thanks
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Fernando Arns Derg