Populate column C based on columns A AND B matching E AND F

Hi,
libre-example.ods (16.2 KB)

I’m trying to something that may not be possible.

I would like to fill “data” column C based on columns A AND B matching E AND F.

I have shown how it would look in “data” column C down to row 25, but I have 1000s of rows and they are not sorted.

“data” (column C) is a value automatically generated/pulled from “ref data” (column G).

“data” (column C) is generated/pulled based on “number” (column A) AND “code” (column B) finding a match in “ref num” (column E) AND “ref code” (column F).

I hope this makes sense.

Thanks

Don’t lose hope - anything that makes sense can be done.

Perhaps you should edit the text of the question with the correct column names - in your example, the columns E and F mentioned in the problem description do not contain the required data.

Once again, do you want to collect (sum?) data from A:C and display it in a table like G:I? Or vice versa?

Sorry about that. I checked it over a few times.

I’ve made it a bit simpler by adding a column that has the 2 reference columns merged into one.

I think it is a VLOOKUP solution I could use.

I have attached the new sheet.
libre-example-002.ods (14.6 KB)

OK, I managed to use the vlookup.

It didn’t compare 2 columns with 2 columns and instead I merged them to make a unique code for each value I needed to be looked up.

=VLOOKUP(AG3,Sheet2.$H$1:$I$38,2,false)