Search for duplicates in 2 columns, return associated data

Mr_Nivek

New Member
Joined
Aug 1, 2013
Messages
3
Hello All,

The best way I can think to describe this is through an example:

In the example below I'd like to search for instances of entries from the first colum (Item Needed) in the second column (Item Ordered). If a match is found I'd like to have the "Item Ordered" and associated "Quantity" and "Unit Price ($)" values returned in the 3 columns following the table.

I appreciate any help I can get. Thank you.

Item NeededItem OrderedQuantityUnit Price ($)
BananaApple20.99
PeachBanana41.00
PearMango11.50
Pear21.25
Strawberry30.50

<TBODY>
</TBODY>
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Assuming your data table begins in A1:

Column E
Code:
=IF(MATCH($A2,$B:$B)>0,$A2)
Column F
Code:
=IF(MATCH($A2,$B:$B)>0,INDEX($C:$C,MATCH($A2,$B:$B)))
Column G
Code:
=IF(MATCH($A2,$B:$B)>0,INDEX($D:$D,MATCH($A2,$B:$B)))
 
Upvote 0

Forum statistics

Threads
1,216,110
Messages
6,128,896
Members
449,477
Latest member
panjongshing

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