Forum Discussion
Looking for Help to indentify duplicates which respect to conditions
Looking for a formula for getting the duplicate data based on the highest version and then copy adjacent row data in next rows .
Example :
InpUt
| Name | Set Type | Version |
| 95591 | Type 1 | - |
| 95692 | Type 3 | - |
| 95692 | Type 1 | - |
| 96292 | Type 3 | - |
| 96292 | Type 3 | A |
| 96292 | Type 3 | B |
| 96292 | Type 1 | B |
| 96292 | Type 2 | B |
| 96293 | Type 3 | - |
| 96293 | Type 3 | A |
| 96293 | Type 3 | B |
| 96293 | Type 2 | B |
| 96293 | Type 1 | B |
| 87665 | Type 1 | B |
| 87665 | Type 3 | B |
| 87665 | Type 1 | C |
| 87665 | Type 3 | C |
| 87665 | Type 1 | D |
| 87665 | Type 3 | D |
| 87665 | Type 1 | E |
| 95597 | Type 1 | - |
| 95597 | Type 2 | - |
| 95598 | Type3 | - |
| 95598 | Type2 | - |
Output
| Name | Set Type | Version | |||
| 95591 | Type 1 | - | Type 1 | ||
| 95692 | Type 3 | - | |||
| 95692 | Type 1 | - | |||
| 96292 | Type 3 | - | |||
| 96292 | Type 3 | A | |||
| 96292 | Type 3 | B | Type 1 | Type 2 | Type 3 |
| 96292 | Type 1 | B | |||
| 96292 | Type 2 | B | |||
| 96293 | Type 3 | - | |||
| 96293 | Type 3 | A | |||
| 96293 | Type 3 | B | Type 1 | Type 2 | Type 3 |
| 96293 | Type 2 | B | |||
| 96293 | Type 1 | B | |||
| 87665 | Type 1 | B | |||
| 87665 | Type 3 | B | |||
| 87665 | Type 1 | C | |||
| 87665 | Type 3 | C | |||
| 87665 | Type 1 | D | |||
| 87665 | Type 3 | D | Type 3 | ||
| 87665 | Type 1 | E | Type 1 | ||
| 95597 | Type 1 | - | Type 1 | Type 2 | |
| 95597 | Type 2 | - | |||
| 95598 | Type3 | - | Type2 | Type3 | |
| 95598 | Type2 | - |
surya300810 Perhaps Power Query can do what you need. See attached file. Note that I changed some of the data as I believe it didn't coincide with the description/explanation in one of the screenshots you uploaded. I marked the changes yellow in the Input list.
11 Replies
- Sanatroy06Copper Contributor
- Riny_van_EekelenPlatinum Contributor
surya300810 Perhaps Power Query can do what you need. See attached file. Note that I changed some of the data as I believe it didn't coincide with the description/explanation in one of the screenshots you uploaded. I marked the changes yellow in the Input list.
- surya300810Copper ContributorThanks for the response , and you solution is very near to the ideal solution only thing is my data set have one issue, that it is possible to have different versions for different type set - which is one of the mistakes in the data set which I need to identify and correct it - So the version value in row no 22 is correct as per the input data set
- Riny_van_EekelenPlatinum Contributor
surya300810 Not sure I follow. If C22 should indeed be a D, then it will no longer be included in the PQ generated table. Change it yourself and press Refresh All on the Data ribbon and see that item 87665 will only show E and Type 1. Isn't that what you want?
- OliverScheurichGold Contributor
I'm trying to understand what you want to do. Does the attached file show your intended result?
For example in the post there is the input
Name Set Type Version 95591 Type 1 - with the intended output:
Name Set Type Version 95591 Type 1 - Type 1 However there isn't a duplicate for Name 95591 and Version - in the data.
- surya300810Copper ContributorCan you share the code for the Above attached PDF - Which will Solve half of my problem.
- OliverScheurichGold Contributor
The data in the pdf. file was entered manually. Unfortunately i can't help you with what you actually want to do. I can't suggest a solution to select the duplicate names of the highest version with a formula or VBA.
EDIT: You can click the button in cell H2 in the attached file to start the macro. This is the only solution i can offer. The result is what i entered manually in the pdf. file.
- SSURYA300Copper Contributor
Actually , I need to eliminate the duplicates for the all the lower revision for the set types
if there is no duplicate entry then we need to keep it and if we have different versions for different set types even for the same number then also we need to show it in the out put
Ideal Output