I am doing quotations in Excel for my company and I am trying to find a way to do 2 things:
- aggregate several quantities of the same product based on its reference number
- return several values for the same references (i.e. different prices)
I was thinking about using VLOOKUP but I cannot find a way to make it sum or return multiple values.
Table outline in the picture attached here, the wanted result would be: - for the 1st function: sum up the table into 3 lines with aggregated quantities for products X Y Z - for the 2nd function: sum up the table into 4 lines with the prices for products X Y Z (X having 2 different prices in the sample data, but I would need the function to be able to return as many lines as there are different prices for the same product)
Thank you very much for you help!
Kind regards, Antoine
Edit: to get a better idea of what I try to achieve, here is another picture: 2nd pic with annotations Quantities of the same product have to be aggregated, except if the unit price is different. Could price difference be based on a subreference to be added to the first table? That would need the vlookup to match 2 values to return a result, is that feasible? Noting that I do not have control over the source data for unit price, meaning that reference and subreference would have to be in different columns rather than concatenated.
The goal is to produce a recap table rather than filter out single values as suggested in the answer.

