xlsxxls

How do I use SUMIFS/XLOOKUP to count each sale?


Using Google Sheets, I'm trying to count individual sales for each SKU. Some of the SKU's are bundles of certain amounts, and I don't know how to get the amount of items in said bundle.

Here is a picture for reference

For example, at O14, I sold one pack, containing 10 units of that particular SKU. I tried using SUMIFS and XLOOKUP, but when looking for that particular SKU, I need to know that 10 units were sold.


Solution

  • I suggest you make another column, extract the value like so:

    =IF(REGEXMATCH(O8, "\d+\*.*"),LEFT(O8,FIND("*",O8)-1),1)
    

    This will get you the value before the *, or 1 if not present. Then you can multiply it with the first column.