1

I am struggling with the following (see snapshot) and I can't understand what I'm missing.

If the id matches, I would like to extract the value of that id in when the values in col2 matches the headers in table2. So for 348, I would expect the value in coverage to be 0.

enter image description here

I would like to achieve the same as in this source: https://www.automateexcel.com/formulas/vlookup-hlookup-combined/

A snapshot of the source example: enter image description here

1 Answer 1

0

Unlike the example you link to, your Table1 doesn't have the line Column #, 2, 3, 4 - that's where HLOOKUP() does the trick. However, you can also search the value in the table without this helper row:

=IFERROR(INDEX($A$2:$D$5;MATCH($F3;$A$2:$A$5;0);MATCH($I3;$A$2:$D$2;0));"???")

or

=IFERROR(OFFSET($A$2;MATCH($F3;$A$3:$A$5;0);MATCH($I3;$B$2:$D$2;0));"")

3
  • hi! Thanks for your answer. However, this only works to extract values related to A and gives unwanted zeroes. I just want 1 and 0 when the id matches. I would like to obtain the output using vlookup and hlookup.
    – Joehat
    Commented Jan 30, 2022 at 12:43
  • I've edited the question in case it helps.
    – Joehat
    Commented Jan 30, 2022 at 12:48
  • @Joehat Oh yes, now your question is much clearer (I changed my answer)
    – JohnSUN
    Commented Jan 30, 2022 at 14:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .