Hi,
I'm not exactly sure what you're looking for, but I'll answer assuming you want to remove duplicate rows.
If you don't need a formula, you can do Data -> Remove Duplicates:
If you have the possibility to use a recent version of Excel (or Google Sheets), this can be done easily with the UNIQUE function: