Hello!
I have two spreadsheets and I am trying to pull data from one spreadsheet to another using the XLOOKUP function. I am trying to pull over a value if a row has a matching ID and Term as the other spreadsheet.
For example I have IDs in both sheets, I have Terms in both sheets, but only one of the spreadsheets has the Value. I need to get the value to the other spreadsheet if it matches the ID and Term.
Spreadsheet 1 ex.
| ID |
TERM |
| 1111 |
Fall |
| 2222 |
Winter |
| 3333 |
Summer |
Spreadsheet 2 ex.
| ID |
TERM |
VALUE |
| 1111 |
Fall |
3.5 |
| 2222 |
Winter |
4.0 |
| 2222 |
Fall |
2.2 |
| 4444 |
Summer |
3.6 |
So using this example, the end result I would want would be Spreadsheet 1 with the relevant matching values if the ID and Term match. So the ID 1111 is in both spreadsheets and has the TERM Fall in both spreadsheets, so I want to add the value 3.5 to spreadsheet 1. Then ID 2222 in the second row has the matching term Winter, so I want to pull in the value 4.0.
The result for this example would be this:
| ID |
TERM |
VALUE |
| 1111 |
Fall |
3.5 |
| 2222 |
Winter |
4.0 |
Currently I am trying to use a nested XLOOKUP and this is what I have but I always get the #Value error:
=XLOOKUP(A2, 'Spreadsheet 2.csv'!$A$2:$A$199039, XLOOKUP(E2, 'Spreadsheet 2.csv'!$E$2:$E$199039, 'Spreadsheet 2'!F:F))
The A column is the ID column and the E column is where my TERM column is in both of my real spreadsheets and the F column in Spreadsheet 2 is where the value I need is.
I am not great with XLOOKUP, so any help would be much appreciated! I am also happy to do another method, but XLOOKUP is the only one I am familiar with that will do this.
Thank you!