Search for text between sheets, copy cell

artizhay

New Member
Joined
Jul 22, 2010
Messages
8
Hello!

What I am looking to do is take the text from three different cells in one sheet on one row and search for any combination of them in one cell on one row of another sheet. If there is a match, I want to take the value of A1 from the second sheet and use it as the value for A1 on the first sheet.

Here is an example.
Sheet called "JMCurrent"
<table style="border-collapse: collapse; width: 815pt;" border="0" cellpadding="0" cellspacing="0" width="1085"><col style="width: 116pt;" width="154"> <col style="width: 166pt;" width="221"> <col style="width: 116pt;" width="154"> <col style="width: 176pt;" width="235"> <col style="width: 82pt;" width="109"> <col style="width: 81pt;" width="108"> <col style="width: 78pt;" width="104"> <tbody><tr style="height: 15pt;" height="20"> <td class="xl63" style="height: 15pt; width: 116pt;" height="20" width="154">Item #</td> <td class="xl63" style="width: 166pt;" width="221">Manufacturer</td> <td class="xl63" style="width: 116pt;" width="154">Category</td> <td class="xl63" style="width: 176pt;" width="235">Desc</td> <td class="xl63" style="width: 82pt;" width="109">Search Term 1</td> <td class="xl63" style="width: 81pt;" width="108">Search Term 2</td> <td class="xl63" style="width: 78pt;" width="104">Search Term 3</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl63" style="height: 15pt;" height="20">773HS849</td> <td class="xl63">Some place</td> <td class="xl63">Projector Headlights</td> <td class="xl63">2002-2003 Toyota Celica CCFL (Black)</td> <td class="xl64">02-03</td> <td class="xl63">Celica</td> <td class="xl63">Black</td> </tr> </tbody></table>
Sheet called "AllNonHID"
<table style="border-collapse: collapse; width: 656pt;" border="0" cellpadding="0" cellspacing="0" width="873"><col style="width: 116pt;" width="154"> <col style="width: 166pt;" width="221"> <col style="width: 116pt;" width="154"> <col style="width: 176pt;" width="235"> <col style="width: 82pt;" width="109"> <tbody><tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt; width: 116pt;" height="20" width="154">Item #</td> <td class="xl65" style="width: 166pt;" width="221">Desc</td> <td class="xl65" style="width: 116pt;" width="154">Price</td> <td class="xl65" style="width: 176pt;" width="235">Quantity</td> <td class="xl65" style="width: 82pt;" width="109">Weight</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" height="20">CCFL-TOY-CEL-0203-BLK</td> <td class="xl65">CELICA, TOYOTA 02-03 BLACK CCFL</td> <td class="xl66">786876</td> <td class="xl65">897847894</td> <td class="xl65">25</td> </tr> </tbody></table>(This is all one row ^^^)

Since JMCurrent has the search terms, I want to search each row of AllNonHID in the description to see if ALL of the search terms are present in some form. If they are, I want to copy the item # from AllNonHID and use it as the new item # in JMCurrent row that row. If there is no match, then leave that row alone and move to the next row.

Here is the info for my real sheets:
JMCurrent
Item # is in column A
The "search terms" are in columns AD, AE, and AF

AllNonHID
Item # is in column A
The description is in column B

If my explanation is unclear: for each row in JMCurrent, I want to take the search terms, search through the entire AllNonHID sheet (around 400 rows) to look for matches, then move to the next row in JMCurrent and repeat the process.

Thank you very much!!
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college

artizhay

New Member
Joined
Jul 22, 2010
Messages
8
Also, I forgot to say that on my real sheets, there are no headings (such as Item #, Desc, etc.). All data begins on row 1.

For each row in JMCurrent, if there are no matches whatsoever in AllNonHID, then I just want to leave that row alone; no deleting or hiding or anything like that. =]
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,400
Messages
5,831,411
Members
430,065
Latest member
ctornabe

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
Top