Basically I have a list of part sales with the previous years sales numbers in each row. Sometimes a customer orders the same part two different times causing it to show up on the excel report twice. This is a problem because it is causing the 2017, 2016, etc data to show up twice as well. When this is turned into pivot table I have incorrect data because of the duplication. Is there a way in VBA after the sheet is populated to cycle through the part name column and if a part exists more than once set a specific range of cells to 0?
In the image below you see one part is duplicated three times. For the second and third on I need to set 2017 qty and to the right to 0.
https://imgur.com/a/Dw2CTDu
In the image below you see one part is duplicated three times. For the second and third on I need to set 2017 qty and to the right to 0.