Hi all,
I have found various solutions to this problem (such as removing duplicate values, but this is not quite what I want).

I have a list of invoice numbers in left column, and in the right column I only want to count the value once.

Like this:

Invoice ID Unique orders
Invoice 1 0
Invoice 1 0
Invoice 1 1
Invoice 2 1
Invoice 3 0
Invoice 3 1
Total 3


I had a formula that looked something like this before

=SUM(IF(FREQUENCY([@[Invoice real]],[@[Invoice real]])>0,1))
=IF(COUNTIF(K65:$K$9028,K65)=1,1,0)


However since I am using a table with dynamic range this formula seems to break every time I sort in a different way.

I am a bit stuck here, so any help would be much appreciated.

Thanks