I assume the goal here is to sum the quantities in column B, for which the first eleven characters of column A match. You could do with sumif, making use of a wildcard. Formula would be: =sumif($A$4:$A$14,"XXX-CC-VVVV"&*,$B$4:$B$14)
In this case the first eleven characters are hardcoded. If you make use of the answer by MattClarke you can refer to the cells you place that function in. "=left(a4,11)
". The asterix sign *
indicates a wildcard. This wildcard is any character or multitude of characters. If you want to know more about wildcards have a look at this tutorial for example: https://www.deskbright.com/excel/excel-wildcard/
If you want to know how often a certain building is mentioned in your table you can make use of the countif formula =countif($A$4:$A$14,"XXX-CC-VVVV"&*)