Create new data column from 2 different word lists

IWLTJONP

New Member
Joined
Oct 31, 2008
Messages
2
Hi,
let's say I have data in columns A-B, and a target list in C:

A B C
dog 21 dog
cat 43 mouse
mouse 21 lion
puppy 45
lion 23

What I need is a way to search column A for each word in Column C, and if found, to print out this data to another column (or worksheet), like this:

D E
dog 21
mouse 21
lion 23

If anybody knows C, I have a script to do exactly this, but I can't figure out how to do it in excel (I'm useless with VB). Please Help me increase productivity in my PhD studies!
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Well to duplicate the values in Col C into Col D, it looks like you can simply use this in D1
Code:
=C1
and copy down as far as required.

However, maybe you want something more complicated - if it is possible for a value to appear in Col C but NOT APPEAR in Col A, then do you want such a value to appear in Col D ?
If yes, post back and we can do that.

Then, to look up the corresponding values from Col B, use something like this
Code:
=vlookup(d1,a$1:b$5,2,false)
and again, copy down.
 
Upvote 0
Perhaps next formulaes could help:
in D1 =IF(NOT(ISERROR(MATCH(C1,A$1:A$20,0))),INDEX(A$1:A$20,MATCH(C1,A$1:A$20,0)),"")
in E1 =IF(NOT(ISERROR(MATCH(C1,A$1:A$20,0))),INDEX(B$1:B$20,MATCH(C1,A$1:A$20,0)),"")
 
Upvote 0
Gerald, I have words that appear in A but do not appear in C--not vice versa. The final result should be the same format as columns A-B, but shorter, since I only include the words from C.
PCL, I'll try those formulae as well.
Thanks!
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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