Match two columns, and bring along values in the corresponding columns - Microsoft Excel for Mac 2011 v. 14.4.1

1

I need to match two columns (B and C) and move down the values (C and D) inserting an empty line where there's no match.

what I have

into this

what I need

Is there a formula that can do this?

user651504

Posted 2016-10-12T14:54:44.913

Reputation: 13

I've tried IFERROR and MATCH functions, and a whole lot of internet searching resulting in solutions that get me partway there, but not inserting the blank lines. I'm newer to functions in Excel so any pointing in the right direction would help. – user651504 – 2016-10-12T17:37:08.847

Answers

0

You should have the tables structured so that the leftmost column is the key, i.e. the unique identifier. In this case, that would be their names. After that, you can simply use VLOOKUP to look up a key in a second table. You can wrap that VLOOKUP in an IFERROR to hide errors by making them equal empty strings (i.e. "")

In your example, column C is redundant, so here's how I'd structure it:

enter image description here

For copy-and-paste purposes, the formula in C1 is =IFERROR(VLOOKUP($A1,$A$7:$B$9,2,0),"") -- then just drag down

airstrike

Posted 2016-10-12T14:54:44.913

Reputation: 628

For the record, I always make my hardcoded cells blue and my formulas black. It's just the standard in the world of Finance and it really helps keep track of what's doing what in your worksheet as it gets more complex. – airstrike – 2016-10-12T15:03:19.633

@user651504 My pleasure! I remember struggling with all of this not too long ago. For the record, if you found that this answers your question appropriately, please upvote it and mark as accepted when you have a chance. And good luck! – airstrike – 2016-10-12T21:04:29.357