Find the max of a column with filters from other columns
I have a column in my shopify data that compiles price and discount price as line price. I want to calculate total discount, to do so based on the unique barcode return the max value (line price) for a given barcode. I will after subtract the difference of the new column and "line price" to calculate discounts. However my formula (below) will generate the row value rather than the max value for a given barcode. Added complication I need to exclude all blank values in column barcode.
Column A: Line price
Column B: Barcode
New column C (objective) find max value for any given barcode
This helped allot, for those products that don't have barcodes how do you exclude it from the equation? since now the few products that have "blank" cells within the column "barcode" all have the same price.