Matching data in 2 worksheets & populating another cell

AMorgan

New Member
Joined
Aug 26, 2010
Messages
27
I have 2 worksheets. In worksheet 2, if D2 equals an employee number in column H in worksheet 1, then I want to populate cell P2 in worksheet 2 with the matched file no. located in column I from worksheet 1. That is, column H has the employee number and column I has the file no. belonging to that employee. Hope this makes sense!
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Try this (change ranges H & I to suit) in Sheet2 cell P2:
Code:
=IF(ISNA(MATCH(D2,Sheet1!H2:H50,0)),"",INDEX(Sheet1!I2:I50,MATCH(D2,Sheet1!H2:H50,0)))
 
Upvote 0
Thanks for that, however, doesn't seem to work. I changed the formula to:
=IF(ISNA(MATCH(D14,Sheet1!$H$2:$H$23250,0)),"",INDEX(Sheet1!$I$2:$I$23250,MATCH(D14,Sheet1!$H$2:$H$23250,0)))
Did I do something wrong in changing it?
I'll try and explain what I'm trying to do a bit better: I have column H in worksheet 1 where I have a list of employee numbers. In column I in worksheet 1, I have a list of file numbers that correspond to that employee. In another worksheet, I have employee numbers in column D. I want to match the employee number in worksheet 1 with the same employee number in worksheet 2 and populate the cells in P2 (worksheet 2) with the file number that matches the employee number from worksheet 1.
Hope this makes better sense!
 
Upvote 0
Your formula is fine assuming it is entered in cell P14 of Sheet2. Recognize that it is set to return a blank cell if no match to the value in cell D14 on sheet2 is found in Column H of sheet1. The formula works fine for me.
 
Upvote 0

Forum statistics

Threads
1,224,548
Messages
6,179,448
Members
452,915
Latest member
hannnahheileen

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top