How to Remove Duplicate Rows Down to the Lowest Amount on Hand in Excel?
Our take
Does this go against rule #6? If so, where do I need to be posting this?
Also, this is my first Reddit post ever and I don't really know what I'm doing. I feel like I'm being too... unimpersonable? Robotic? I don't know, like rude? I really don't mean to be. Socializing is not my forte - so I'm sorry in advance... And honestly, any help would be appreciated. I really enjoy learning everything about Excel. Thank you!
I just started taking some duties over for an inventory job.
Basically, we get an inventory report every night listing the quantities of each item listed in a package that we sell. We have about 100 packages with multiple items in them and I need to remove all duplicate rows from Column A based on the lowest number on hand in Column C. We have packages ranging from having only two items to some with up to eight.
The person who trained me is doing this manually - looking through every row and deleting each packages' duplicates. And I feel like there has to be some sort of formula that could make this go a lot easier. It would be great if it could delete the rows for me, but even just like a "highlight all lowest numbered items in each duplicate named package" would help.
I don't know if I'm making sense. Here is an example:
The original Spreadsheet:
| Name | Description | On Hand |
|---|---|---|
| AA1736 | 5-Burner Grill Package | 14 |
| AA1736 | 5-Burner Grill Package | 115 |
| AA1736 | 5-Burner Grill Package | 8 |
| AA1736 | 5-Burner Grill Package | 3 |
| AA1736 | 5-Burner Grill Package | 25 |
| AA1736 | 5-Burner Grill Package | 11 |
| BB16797 | Hammer and Measure Package | 1 |
| BB16797 | Hammer and Measure Package | 4 |
| BB16797 | Hammer and Measure Package | 11 |
| CC18794 | Hand Tool Set | 6 |
| CC18794 | Hand Tool Set | 6 |
| CC18794 | Hand Tool Set | 6 |
| CC18794 | Hand Tool Set | 6 |
| CC18794 | Hand Tool Set | 6 |
| DD1683 | Double Burner with Tank | 0 |
| DD1683 | Double Burner with Tank | 2 |
| DD1683 | Double Burner with Tank | 14 |
| DD1683 | Double Burner with Tank | 17 |
| DD1683 | Double Burner with Tank | 99 |
The finished spreadsheet:
| Name | Description | On Hand |
|---|---|---|
| AA1736 | 5-Burner Grill Package | 3 |
| BB16797 | Hammer and Measure Package | 1 |
| CC18794 | Hand Tool Set | 6 |
| DD1683 | Double Burner with Tank | 0 |
[link] [comments]
Read on the original site
Open the publisher's page for the full experience
Related Articles
- 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. https://preview.redd.it/0jfht5w4ejyg1.png?width=460&format=png&auto=webp&s=bc237e320069cc78e73e3525253575af4f92e10a This is what I want the result to be. https://preview.redd.it/qf2gafp5ejyg1.png?width=460&format=png&auto=webp&s=9d6fb08df35a80c5e802c03b88be0b8e754b1e22 Is this possible, or has anyone got any ideas for how to gather these sums a different way? submitted by /u/rehaharbor [link] [comments]
- Any way to automate removal of older rows of data?I have a spreadsheet with 4 columns: first name, last name, score and date. I have people who are duplicated, some with the same date which I can easily remove with "remove duplicates" but I have examples where there are people with multiple rows from where they have taken a test a few years later, and i am trying to find a way to optimise my chopping up of this spreadsheet to only have a single row per user, and showing only their most recent score for the test. The date column is dd/mm/yyyy and then a 24 hour format time stamp and I can't think of a good way to optimise that as it covers multiple years. Theres no good consistency over the old date and the most recent date I imagine excel has some way of pruning older data. Atleast I hope so or ill have to check 50000+ rows manually to remove old results 😭 submitted by /u/Skellyhell2 [link] [comments]
- I need to do a complex sort involving large amounts of data.Hello, I have posted before HERE. To reiterate, I work at a library and I essentially need to do a review of hundreds of thousands of lines of data compiling information about different periodical volumes into one line. They are technically all different volumes (and there is a column for that) but can be organized under a single periodical title. The raw output data will look something like this: Periodical A / Volume 1 / Last Loaned Date / Usage Number Periodical A / Volume 2 / Last Loaned Date / Usage Number Periodical A / Volume 3 / Last Loaned Date / Usage Number Periodical A / Volume 4 / Last Loaned Date / Usage Number Periodical B / Volume 1 / Last Loaned Date / Usage Number Periodical B / Volume 2 / Last Loaned Date / Usage Number etc. What I need to do is find some way of sorting or filtering or some algorithm that can first, take only the most recent date from the Last Loaned Date column among all volumes, and eliminate all others. Second, take the sum of all Usage Numbers for all volumes of that periodical and put it into a single number. Third, combine these two things into one line for the periodical in question. So the output should look something like: Periodical A / Last Loaned Date (most recent) / Usage Number (total among all) Periodical B / Last Loaned Date (most recent) / Usage Number (total among all) In this way I hope to get hundreds of thousands of lines of data down to about 50,000, representing the number of different periodicals we hold at the library. I have now moved to Excel 365 and am trying to implement the solution recommended by u/Downtown-Economics26 HERE: LINK. However, even the test case is not working for me. I am instead getting a NAME? error in the execution. This is what I see: LINK. I think I am using the exact same function as him, and I have Excel 365 so I can use DROP and GROUPBY functions, but I am still getting an error. Does anyone know why this might be the case? submitted by /u/-Ophidian- [link] [comments]
- Need some assistance easily organizing what is becoming a rather large spreadsheethttps://i.ibb.co/N6kN1bwz/sample.jpg This is an example of a worksheet I am building on Google Sheets. List of recipes I've made and liked in column A, all the ingredients used across them all in row 1 , the amounts of each ingredient that goes into a specific recipe in the cell that corresponds. This is more of a fun project that may be handy for me later, it's not a huge deal if I can't do what I want but it sure would make it easier if I can since this is becoming a pretty big table. What I would like to be able to do is click on a recipe name in column A, and have Excel or Google Sheets hide every cell that does not specify the ingredient needed and the amount needed for that recipe. Is this possible? Ideas how to accomplish this? This submitted by /u/Due-Editor3682 [link] [comments]