Based on your sample file...
First you should correct O26 - should be 25 rather than 24.
Then based on your modules (numbers with exception of "A") you can use
The above (in essence)y checks that the column of each cell in the range referenced is odd (C,E etc) and that the value within the cell being iterated equals Module of interest and multiplies the numerical value from the cell to the left of the cell being iterated by 1 or 0 depending on whether both prior conditions held true (ie module match and column being processed is odd).
The SUBSTITUTE is used to handle the fact that some cells within the range contain "A" (removed) and the 0& to account for the fact that some will be blank/null
Both features combined ensure that when the value in the cell to the left is * by 0/1 the value is numeric in nature... if not the SUMPRODUCT would generate a #VALUE! error eg:
TRUE*TRUE*"a" --> #VALUE!
whereas
TRUE*TRUE*"0" -> 0
(Boolean TRUE/FALSE when coerced become 1/0 respectively)
Bookmarks