I’m not positive I know exactly what you need done, but here is something you might use as a start. This is assuming you have one database named Database1 with the the company name in a field named CompanyName along with another database named Database2 with contacts in a field named ContactName. There is also a field in both databases named companycode with the unique code for each company.
This is setup as a formula using the
arrayfilter( functiion but could easily be written as a statement using the
arrayfilter statement instead. This just uses
arraybuild( to make an array of the company codes and then uses
arrayfilter( with two
superlookup( functions to gather the corresponding info from the two files. No idea how fast this would be in execution so you would have to test that at your end.
I have not check this in actual practice so be forewarned (list of legal disclaimers to follow. )