Hey everyone, I’m stuck on a spreadsheet problem. I need to count unique order numbers in a column that has other data mixed in. The tricky part is that I only want to count each order number once, even if it appears multiple times.
The order numbers all have the same suffix at the end. I thought I could use this to filter them out, but I’m having trouble combining the unique and contains criteria.
I’ve tried using a formula like this:
=COUNTIF(Sheet1!A:A, UNIQUE("*ending"))
But it’s not giving me the right results. Can anyone help me figure out how to count only the unique order numbers with a specific ending? Thanks in advance for any tips!
I’ve encountered this issue in my work as well. A solution that’s worked for me is using a combination of UNIQUE and FILTER functions, then counting the results. Here’s the formula:
This first filters the column for cells ending with “ending”, then extracts unique values, and finally counts them. It’s efficient and doesn’t require helper columns.
If you’re using an older version of Excel without FILTER, you can achieve similar results with array formulas:
hey there! have u tried using a pivot table? it’s super easy. just select ur data, go to insert > pivot table, then drag the order number field to rows and values. in values, change it to ‘count distinct’. then u can filter for orders ending with ur suffix. works like a charm for me!