Compare two lists and paste content if match is found

jeffsdan

New Member
Joined
Feb 13, 2014
Messages
13
I need to search the content from one list (List A, Column A) for the mention of items from another list (List B, Column A), and if any matches are found, I need to publish in Column B of List A the data from Column B of the associated matching item of List B. Can anyone help?
Tables below to help clarify what I'm asking.



List A (The list being searched)
List AColumn B (blank)
The bucket e(5) was full
The broom stood
The call came d(4)

<tbody>
</tbody>


List B (The reference list - e.g., "does list A contain any of these items")

List BColumn B
d(4)d(4) Yeah
e(5)e(5) No!
f(6)f(6) Ok

<tbody>
</tbody>


What I need the final product to look like:

List AAdded text from List B, Column B
The bucket e(5) was fulle(5) No!
The broom stood
The call came d(4)d(4) Yeah

<tbody>
</tbody>
 
hiker95!

This CompareListsV3 macro is amazing! Thank you for your efforts! I would like to ask for your help. I need to search the content from any number of list (in "List A" Sheet) and put the result before A column in "List A" Sheet.


Here is my example:

Excel 2007
AB
1d(4)d(4) Yeah!
2e(5)e(5) No!
3f(6)f(6) Ok
4

<tbody>
</tbody>

List B

Excel 2007
ABCDEFGH
1The bucket e(5) was d(4) fullother contentother contentother contentother content
2The broom stoodother contentother contentother content The broom f(6)
3The call came d(4)other contentother contentother contentother content
4

<tbody>
</tbody>

List A

Excel 2007
ABCDEFGH
1d(4) Yeah! e(5) No!The bucket e(5) was d(4) fullother contentother contentother contentother content
2f(6) OkThe broom stoodother contentother contentother contentThe broom f(6)
3d(4) Yeah!The call came d(4)other contentother contentother contentother content
4

<tbody>
</tbody>

List A
Thank you in advance for your help!
 
Upvote 0

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Calltech,

Welcome to the MrExcel forum.

1. What version of Excel, and, Windows are you using?

2. Are you using a PC or a Mac?

I am confused by your screenshots, and, descriptions, in your last two replies.

In order to continue, and, so that I can get it right on the first try, I would like to see your actual raw data workbook/worksheets, and, what the results (manually formatted by you) should look like.

You can post your actual raw data workbook/worksheets to the following free site (sensitive data changed), and provide us with a link to your workbook:

https://dropbox.com
 
Last edited:
Upvote 0
I use Microsoft Office Professional Plus 2013 64bit and Windows 8 Enterprise in PC.

Here is my example:
<a href=http://www.filedropper.com/comparetwolistsandpastecontentifmatchisfound><img src=http://www.filedropper.com/download_button.png width=127 height=145 border=0/></a><br /><div style=font-size:9px;font-family:Arial, Helvetica, sans-serif;width:127px;font-color:#44a854;> <a href=http://www.filedropper.com >file storage</a></div>

Thank you in advance for your help!
 
Upvote 0
Calltech,

Your link is asking me to Sign In, and/or, create an account?????

You can post your workbook/worksheets to the following free site (sensitive data changed), and provide us with a link to your workbook:

https://dropbox.com
 
Upvote 0
And how about my solution?

Dear Hiker95

Great.
Its useful to me as well. But problem is, if data in column B already exist , then macro is it adding the text in earlier data instead of overwriting and giving some alert (e.g. replace and change colour to RED)

many thanks in advance
 
Upvote 0
Dear Hiker95

Great.
Its useful to me as well. But problem is, if data in column B already exist , then macro is it adding the text in earlier data instead of overwriting and giving some alert (e.g. replace and change colour to RED)

many thanks in advance

Dharmesh Thakkar,

This thread is becoming very difficult to follow, with everyone having different raw data, and, worksheets.

Please start a new thread for your question and be sure to give it a search friendly title that accurately describes your need.

In your New Thread include:

1. What version of Excel, and, Windows are you using?

2. Are you using a PC or a Mac?

To start off, and, so that we can get it right on the first try:

Can you post a screenshot of the actual raw data worksheet?

And, can you post a screenshot of the worksheet results (manually formatted by you) for the results that you are looking for?

To post a small screen shot (NOT a graphic, or, picture, or, PNG/IMG file, or, flat text) try one of the following:

There are several methods. Here are 3 for you to investigate.

Excel Jeanie
Download

Borders-Copy-Paste
http://www.mrexcel.com/forum/about-board/444901-how-create-table-like-aladin.html#post2198045

MrExcel HTML Maker
If you do not know how to install and how to use HTML Mr.Excel Maker
https://www.youtube.com/watch?v=JycvgGppxt0&feature=youtu.be

To test the above:
Test Here

Or, you can post your workbook/worksheets to the following free site (sensitive data changed), and provide us with a link to your workbook:

https://dropbox.com

Then send me a Private Message, with a link to your New Thread, and, I will have a look.
 
Upvote 0
Calltech,

When I attempted to download/open your workbook in your reply #18, I received the following message:

Excel found unreadable content in 'Compare two lists and paste content if match is found.xlsx'. Do you want to recover the contents of this workbook? If you trust the source of this workbook, click Yes.

Please try again with a new copy of your workbook.
 
Upvote 0

Forum statistics

Threads
1,215,517
Messages
6,125,290
Members
449,218
Latest member
Excel Master

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