xld: The string "Pr Code" in column C of "Detail Report" or the actual PR Code in Column E of "Detail Report" can be use to look at the same code in Column L on "As Built" and then add only the numbers that match that code (same row) in Column I on "As Built".

p45cal: Yes there are two instances of Pr Code when you filter. So those two instances have a corresponding code in Column E on "Detail Report" and column L on "As Built". The loop I attempted basically said: If column C on "detail report" = "Pr Code" OR column E on "detail Report" = Column L on "As Built" then look at column I on "As Built" and add only the numbers that correspond to those conditions. The number I should get for the current WB should be 2..but I get 5.

Did that make sense or am I still explaining it bad?