0

I have data like this in Excel:

ColA         ColB        ColC           ColD
1B                         1B            E 
2B                         4B            C
3B                         5B            E
4B
5B

I would appreciate a formula to be applied in ColB for the following result:

ColA         ColB        ColC           ColD
1B            E            1B            E 
2B                         4B            C
3B                         5B            E
4B            C
5B            E
pnuts
  • 58,317
  • 11
  • 87
  • 139
  • possible duplicate of [Comparing two columns, and returning a specific adjacent cell in Excel](http://stackoverflow.com/questions/18191835/comparing-two-columns-and-returning-a-specific-adjacent-cell-in-excel) – Jerry Feb 12 '14 at 17:49

2 Answers2

2

I think this may be much simpler than the possible duplicate suggested - ie just a very standard LOOKUP (which is duplicated elsewhere even MORE often!):

in B2 and copied down to suit:

=IFERROR(VLOOKUP(A2,C:D,2,0),"")
pnuts
  • 58,317
  • 11
  • 87
  • 139
0

in cell B2, enter

=IFERROR(INDEX($D$2:$D$4,MATCH(A2,$C$2:$C$4,0)),"")

and paste down

Should do the trick!

Dan85
  • 5
  • 1
  • 4