Search code examples
excel-formulaexcel-2007

Update a column in sheet 2 if another column in same sheet matches a column in sheet 1


I have 2 sheets in my excel workbook.

Sheet 1 has 3 columns

AccountNumber

City

Postcode

Sheet 2 has one coumn only namely AccountNumber.

I would like to update sheet 2 with city and postcode from sheet1, where the AccountNumber in both sheets match.

Is there a simple way of doing it without VBA?

Thanks


Solution

  • VLOOKUP is what you are looking for:

    https://support.office.com/en-us/article/vlookup-function-0bbc8083-26fe-4963-8ab8-93a18ad188a1

    The basic functionality is that you have a search parameter, a matrix to search in and a result row

    =VLOOKUP(SEARCHPARAMETER;SEARCH_MATRIX;ROW_TO_RETURN;EXACT_MATCH_BOOLEAN)

    There are plenty of examples around the web