You have a few problems in the line of code you showed. The biggest problem is that if you want to include a quote " inside a string in VBA, you have to double it "". Also the sample workbook doesn't match what you are showing the code. Also, if you include a value in SUMIFS it is assumed that you want to match to be equal to that value. You don't have to build
"="&B2
you can just use
B2
This is not an error, but it adds the complexity and makes errors harder to find, even more so when you do this in VBA.
I will try to fix your code the best I can but it can't really be tested because it refers to an external file that is a completely different format than your sample file.
Bookmarks