title: How to search for specific words in column and return it to its same row but another cell?
body: <p>I've returned a G3 and H3 value to M3 and N3 cell as result.
  What I want is to find only 1 specific word from cell(J3) like "chocolate" and return it to Cell(M3)<br><br>
  Is there a way to write an Excel macro to find those specific words listed in Column(G) in Column(J) and if Column(J) contains those specific words the macro returns only the specific word to Column(M) to the same row it was found. (but another cell, like M3 on the screenshot)<br><br><img src="https://i.stack.imgur.com/F9BdO.jpg" alt="Excel Macro Screenshot"></p>
  
  <pre><code>Private Sub CommandButton1_Click()
  Dim score1 As String, score2 As Integer, result1 As String, result2 As String
  
  score1 = Range("G3").Value
  score2 = Range("H3").Value
  
  If score1 = "chocolate" Then
  result1 = "chocolate"
  result2 = "4"
  Else
  result1 = "" And result2 = ""
  End If
  
  Range("M3").Value = result1
  Range("N3").Value = result2
  
  End Sub
  </code></pre>
  
  <p>It's working with Range(Only One Cell).<br><br>
  But how can I search for the specific words listed in Columns("G3:G7") to be found in Column("J:J") and when it is found return the specific word to Column("M") to the same row it was found.<br><br>
  So I can press OK! CommandButton and if Column("J:J") contains any words in Column("G:G") the "found" exact word from Column("G:G") will be inserted to Column("M:M") to the same row where it was found.</p>
  
  <p>I've tried with simple functions as:</p>
  
  <pre><code>=IF(ISNUMBER(SEARCH($G$3;"*"&amp;A:A&amp;"*"));"chocolate";IF(ISNUMBER(SEARCH($G$4;"*"&amp;A:A&amp;"*"));"muffin";IF(ISNUMBER(SEARCH($G$5;"*"&amp;A:A&amp;"*"));"lemon";IF(ISNUMBER(SEARCH($G$6;"*"&amp;A:A&amp;"*"));"monkey";IF(ISNUMBER(SEARCH($G$7;"*"&amp;A:A&amp;"*"));"baby")))))
  </code></pre>
  
  <p>and:</p>
  
  <pre><code>=IF(ISERROR(SEARCH(D3;"*"&amp;A3&amp;"*";A3));B3;"")
  </code></pre>
  
  <p>It's working as you can see below but macro would be easier.<br><img src="https://i.stack.imgur.com/Nh70F.jpg" alt="Not macro but working"></p>