Forum Discussion
HaniroothC
Jul 13, 2023Copper Contributor
How to check if all values are same
Hello forum, I need help with the below scenario. I have part numbers with varying 6 digit codes. I need to check if the part numbers has same six digits or if there is a difference. Attached a samp...
- Jul 13, 2023
HaniroothC Perhaps not the prettiest solution but if you change the layout of the PT a bit and then create a unique list of part numbers, you can use COUNTIF to count the number of times a part number occurs in the PT. Filter out the ones with a count of 1 and you are left with the ones you need to look into.
Or perhaps with Power Query, but since you are on a Mac, you need to have a current MS365 subscription.
PeterBartholomew1
Jul 13, 2023Silver Contributor
This provides a somewhat devious approach using the 365 FILTER function
= LET(
distinctParts, UNIQUE(table),
uniqueParts, UNIQUE(table,,TRUE),
multipleOccur, UNIQUE(VSTACK(distinctParts, uniqueParts),,TRUE),
multipleOccur
)The key line stacks a list of distinct parts with a second list containing those parts that occur only once. In the new list the combinations that originally occurred once are now duplicated. Removing them returns the desired list.