Get rid of duplicates in several columns based on a unique value in one column?
EDIT: Thanks for all the suggestions! I like the one I marked as verified because it's very simple and something I can easily teach to coworkers.
I manage a private Wordpress-based web store. We invoice the client each month based on a spreadsheet export from Wordpress.
It's necessary for this export to have a row per line item, which means we get duplicates of all the other order data, like shipping cost, order subtotal, and order total. We need the sums of those mentioned columns, so we end up manually deleting all the duplicates to do an =SUM at the bottom.... It's time consuming and prone to error, given that a monthly invoice has anywhere between 800 to 1500 line items.
I've searched up similar solutions that can formulaically delete duplicates after the first unique value, but I don't think that would work here because there could be the same values across different orders. How can I do this using the order numbers, since those are unique?
Example attached. Note that several orders have the same shipping cost.
This is what I want the result to be.
Is this possible, or has anyone got any ideas for how to gather these sums a different way?
[link] [comments]
Want to read more?
Check out the full article on the original site