Forum Discussion

dph_7's avatar
dph_7
Copper Contributor
May 12, 2022

find same value 2 worksheets and populate value from different column

Hi All, 

 

So this is probably super basic but I have tried a VLOOKUP and IF formula and not getting anywhere. 

 

Basically I'm trying to match a value in different worksheets and get different cell in work sheet 2 on the same row as the matched value to populate on worksheet 1.

 

 

Formula location='worksheet1!F2', in worksheet 1, find <employeenumber> in column B, match values to <employeenumber> in column D in worksheet 2, if same/found, populate <Salary> in column C 'worksheet2!C'

 

Any help in the formula I need here would be greatly appreciated

 

D

1 Reply

  • dph_7 

    If you have Microsoft 365 or Office 2021:

    =XLOOKUP(B2,'Worksheet2'!D:D,'Worksheet2'!C:C,"")

    If you have an older version:

    =IFERROR(INDEX('Worksheet2'!C:C,MATCH(B2,'Worksheet2'!D:D,0)),"")

    Replace Worksheet2 with the real name of the sheet with the data to look up,then fill down.

Resources