Search code examples
excelexcel-formulaexcel-2007

Get the content of a column based on the column value in excel


By checking the value in answer column it should return content from that column here answer is C so it should get Delhi from column C and put it in output column


Sample

enter image description here


Solution

  • As Davesexcel stated, it seems HLOOKUP could work.

    Here is a Google Sheet using HLOOKUP with a formula that should work in Excel as well: https://docs.google.com/spreadsheets/d/1LaCqkcLpgiQ1cYZEUBSSYbJkOaht1A34Af1MlZJwIc0/edit?usp=sharing.

    The formula I have as an example is:

    =hlookup(F2,B1:E2,row())