Duplicate elimination formula not working in Numbers

I tried this formula, which works in excel, on numbers to eliminate duplicates, but in numbers it doesn't work. 

I don't understand where I'm wrong.

The formula is in table 2 A2


=INDEX(TABLE1::$A$2:$A$20;MATCH(0;INDEX(COUNTIF($A$1:A1;TABLE 1::$A$2:$A$20););0))


[Re-Titled by Moderator]

iMac 24″, macOS 15.1

Posted on Jan 25, 2025 11:45 PM

Reply
Question marked as Top-ranking reply

Posted on Jan 26, 2025 2:14 AM

Numbers doesn't support "array" formulas like that. But there are MUCH easier ways than using a formula.


Try an 'Is Distinct' filter like this:




After the filter is turned on select the visible cells in the original table, command-c to copy, click once in a cell of an existing destination table, and command-v or Edit > Paste and Match Style to paste.



Or, just as easy, use a Pivot Table.


Click in the original table with the duplicates, choose Organize > Create Pivot Table > On Current Sheet and drag the relevant field into the Rows box as shown here. Then copy-paste from the Pivot Table into your destination table.




More on Filters here:


Filter data in Numbers on Mac - Apple Support


More on Pivot Tables here:


Intro to pivot tables in Numbers on Mac - Apple Support


SG



5 replies
Question marked as Top-ranking reply

Jan 26, 2025 2:14 AM in response to Dubbia

Numbers doesn't support "array" formulas like that. But there are MUCH easier ways than using a formula.


Try an 'Is Distinct' filter like this:




After the filter is turned on select the visible cells in the original table, command-c to copy, click once in a cell of an existing destination table, and command-v or Edit > Paste and Match Style to paste.



Or, just as easy, use a Pivot Table.


Click in the original table with the duplicates, choose Organize > Create Pivot Table > On Current Sheet and drag the relevant field into the Rows box as shown here. Then copy-paste from the Pivot Table into your destination table.




More on Filters here:


Filter data in Numbers on Mac - Apple Support


More on Pivot Tables here:


Intro to pivot tables in Numbers on Mac - Apple Support


SG



Jan 26, 2025 8:27 AM in response to Dubbia

If you want/need to use a formula, here is a formula that will flag duplicates in a column of data. It is more complicated than what we used to do with COUNTIFS but Numbers has a long-standing bug that screws up the COUNTIF method if you try to sort the table.



C2 =IF(ROW()−1=XMATCH(B2,B,0,1),B2,"duplicate")

Fill down

The -1 is to account for the one header row in the table.


This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Duplicate elimination formula not working in Numbers

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.