Hi and welcome to the forum
I will take a look at your file and see what I can come up with.
Just some info vlookup() will return ONLY the very 1st instance of something that you are searching for, it cannot add or count anything (generally)
Countif() and countifS() do just that - they count stuff based on certain specified criteria...countifS() can take multiple criteria, countif() only 1
sumif() and sumifS() add stuff based on certain specified criteria...sumifS() can take multiple criteria, sumif() only 1
Edit: humdingaling looks like they may have what you want?
Bookmarks