Im trying to combine data from two separate data sets, one of which only has a subset of values from the other. Its a bit hard for me to explain so Ive attached an example. In sheet5 and sheet6 are the two data sets I have and in sheet7 is want I want to end up with. All the names with the same IDs in column B of sheet 6 should end up with the same ID from column B of sheet5.
Sorry if this is difficult to understand. Im sure there is some simple way to do this but I cant figure it out.
In sheet6 (or a copy of it), in cell D1 enter:
=VLOOKUP(A1,Sheet5!$A$1:$B$3,2,FALSE)
and copy down. This is a helper column.
in sheet6 (or a copy of it) in cell C1 array-enter (that is Ctrl+Shift+Enter, NOT just Enter) this formula:
=INDEX($D$1:$D$7,MATCH(B1,IF(ISNA($D$1:$D$7),FALSE,$B$1:$B$7),0))
and copy down.
That's it.
To get rid of formulae and the helper column, copy/paste-special:values column C in situ, then delete column D.
Last edited by p45cal; 06-15-2016 at 11:44 AM.
p45cal Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.