# Function to know if a row duplicate in another table

Hello everyone!
I’m new to Airtable and I still have trouble using formulas, here is what I’m seeking to do:
I would like to know if a row in a table let’s call it table1 repat itself in another table (table2).
To do so if possible I want to have a detector in table3 and two other fields linked to table1 and table2 so it would be automated.
I think the automation is too complex for me to do, so I would appreciate if someone has an idea on which formulas to use or even know if it’s possible to know if a row repeats itself in another table.

If there is a possibility that a duplicate record exists in different tables, its usually a sign that `[Table 1]` and `[Table 2]` should really just be one table.

Can you explain your base structure a little so I can recommend a course of action? (Again, I will probably say just combine your two tables.)

Yes, sure you right I forgot to mention the table structure.
So we are trying to use airtable for accounting and forecast of operations.
Therefore in table1, we have actual operations from our bank statement.
Then in table2, I enter future possible operations, let say the for the next month.
Finally, I want to know if the forecast operation actually happened or no.
I was thinking of duplicate because I can’t think of a formula allowing us to do so.
Thank you for replying and have a good day!

Okay. Make a `[Table 3]`. This third table will have only one record, which will in turn link to every record in `[Table 1]` and every record in `[Table 2]`. Common practice here is to make the value of the primary field in `[Table 3]` a period, but you can name the record anything you want.

Go ahead and link all the records to the `[Table 3]` record. To make sure all future records are linked to the record, filter your views to where `{Table 3} = '.'`, and hide that field from view.

You will probably need to make a “match key” field in both `[Table 1]` and `[Table 2]` which combines all relevant data into one field which Airtable can use to compare records to each other. Make a formula field in both tables with a formula like this: `{Field 1}&':'&{Field 2}&':'&{Field 3}&':'&{Field 4}`.

Add a lookup field to `[Table 3]` which returns the match key in `[Table 1]`, and another that looks at the match key in `[Table 2]`

Then, assuming `[Table 2]` is your forecast table, make a lookup which reports the match key lookup field of `[Table 1]` records in `[Table 3]`. Finally, make a formula field with this formula or something similar: `IF(FIND({Match Key},{All Table 1 Match Keys}),'Duplicate','Not a Duplicate')`

Here’s a sample base for reference:

Thank you so much for your help!! I look forward to implementing your suggestion !