VLOOKUP with multiple IDs

matt2952

New Member
Joined
Jul 3, 2017
Messages
5
Hi,

I have a sheet which is using VLOOKUP to get data from a salary field linked by an ID number which is on another sheet associated with the salary


The problem I have is that we have multiple entries (rows) which have the same ID field so we essentially only have one row which displays the salary linked to the ID number but the others don't fetch the salary.


What I want to do is have a formula which is basically 'IF the ID number matches the ID number of the row with the salary field filled in THEN copy the same salary to the empty fields on the other rows.'


To visualize:

ID | Salary (fetched by VLOOKUP from ID)
1 | £100
2 | £110
3 | £105
3 |
3 |
4 | £120
5 | £150

As above the VLOOKUP doesn't fetch if the ID is the same (as the other sheet has only one instance of the ID)
So I was wondering how to get excel to display the right number (£105) in the blank spots


Thanks in advance








 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Hi Matt,

This sounds a little like maybe the array in the VLOOKUP isn't anchored with $'s. If it's not, when you drag the formula down on this sheet, the range will migrate south as well and maybe miss the ID you want. I'd double check that first.
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,242
Members
452,623
Latest member
russelllowellpercy

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