How to dynamically search and update data using multiple files

Not sure if this is even possible, but here goes.

I have three csv files. The first file, contains user data in a series of columns. One field is a userid. I need to search the second file, containing data about each user, for the specific userid. Once i have established this, i need to search a 3rd file for that user’s name/email, which is a column in the first file, and take a column from that row, and place it into the second csv file, about 22,000 times.

Yeah that pretty much sums it up. I was going to load these files into mysql and perform the automation there, but wanted to check if there was a way of doing this in LO first.

Do you mean the formulas of this kind - =VLOOKUP(VLOOKUP(A2;$Sheet1.$A$2:$B$22000;2;0);$Sheet3.$A$2:$B$22000;2;0)? Yes, Calc can do this task. Although it will take some time