HSHO
HSHO

Reputation: 525

Removing duplicates based on single column

I am tryng to remove the Duplicate based on first column using this below formula but when i am trying to add the group by Col1 its is throwing an error.

Then i read that we have to sum count or average function before applying the gropu by but there is not such column where i can apply one of them

Your help will be much appreciated to remove the Duplicate based on Single Column that is ColA

=query(ARRAYFORMULA(clean(PROPER(TRIM({{Sheet1!A1:E,{"Employee";"Sheet1"&Sheet1!Z2:Z}}; {Sheet2!A2:E,"Sheet2"&Sheet2!Z2:Z}})))), "Select Col1, Col2, Col3, Col4, Col5 where Col1 is not null",1)

Upvotes: 0

Views: 284

Answers (1)

doubleunary
doubleunary

Reputation: 18698

Use vlookup() and unique(), like this:

=arrayformula( 
  iferror( 
    vlookup( 
      unique(Sheet1!A1:A), 
      Sheet1!A1:E, 
      column(Sheet1!A1:E), 
      false 
    ) 
  ) 
)

Upvotes: 1

Related Questions