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!!
 

Some videos you may like

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

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. =]
 

Subscribe on YouTube

Watch MrExcel Video

Forum statistics

Threads
1,106,731
Messages
5,513,074
Members
408,936
Latest member
savageanman

This Week's Hot Topics

  • Sort code advice please
    Hi, I have the code below which im trying to edit but getting a little stuck. This was the original code which worked fine,columns A-F would sort...
  • SUMPRODUCT with nested If statement
    Hi everyone, Hope you're all well. I'm hoping someone will be able to point me in the right direction with a problem I'm having with a SUMPRODUCT...
  • VBA - simple sort is killing me!
    Hello all! This should be so easy, but not for me, apparently! I have a table of data that can be of varying lengths and widths. My current macro...
  • Compare Two Lists
    I have two Lists and I need to be able to Identify differences between them. List 100 comes from a workbook - the other is downloaded form the...
  • Formula that deducts points for each code I input.
    I am trying to create a formula that will have each student in my class start at 100 points and then for each code that I enter (PP for Poor...
  • Conditional formatting formula required for day of week and a value
    Hi, I have a really simple spreadsheet where column A is the date, column B is the activity total shown as a number and column C states the day of...
Top