I was thinking more about your problem, and if you have contorl over the data you are looking for, I have another suggestion that you could try.
In the 'mysheet' where the raw data is stored, add a new column that combines each column into one cell with some kind of unique separator not contained in your data:
=B1&"+"&C1&"+"&D1&"+"&E1 etc...
Then you can do one VLOOKUP or INDEX / MATCH for each row, not 40.
Once you have it on a new sheet, you can separate the results.
Separation without formulas
Copy / Paste the results of the search formulas into the Values in the next column.
Select this column and on the Data tab in the ribbon, select Text to Columns .
Leave it on Delimited , click Next . Uncheck the tab , check Other and enter your separator (+ in my example).
Click Finish .
Formula Separation
Use =FIND() to search for each delimiter and =MID() to pull the text between each set of delimiters, using the previous delimiter as Start_num.
Definitely the more complex of the two methods.
source share