Search for text, copy and paste row with headers into new worksheet

ninaking

New Member
Joined
Jun 5, 2011
Messages
15
Hello,

I'm using Excel 2007, running Windows Vista. I searched in the forums but didn't see anything combining all of the functionality I need. In my spreadsheet, the data is not normalized so the value I am searching for can be within any row. If the value is found, I'd like to copy that entire row to another worksheet. I was able to get it working for the first value found but it goes into an endless loop when I try to paste the second value. Also, since the data can be in multiple places, when pasting, I'd like to paste the worksheet name in a row and then paste the found row below it. Here's the code.
[VBA]
Sub FindAndPasteRows()
Dim oSheet, Cutrange As Object
Dim Firstcell As Range
Dim NextCell As Range
Dim WhatToFind As Variant
Dim Flag As Boolean, c As Object
Dim FirstSheet As Object, a As Object
Dim myUnion As Range
Dim myString As String
Dim myRow As Integer
Dim wksPasteTo As Worksheet
Dim rngPasteTo As Range

myRow = 1
myString = "A" & myRow

WhatToFind = Application.InputBox("What are you looking for ?", "Search", , 100, 100, , , 2)
If WhatToFind <> "" And Not WhatToFind = False Then
For Each oSheet In ActiveWorkbook.Worksheets
oSheet.Activate
oSheet.[a1].Activate
Set Firstcell = Cells.Find(What:=WhatToFind, LookIn:=xlValues, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False)
If Not Firstcell Is Nothing Then
Firstcell.Activate
'MsgBox ("Found " & Chr(34) & WhatToFind & Chr(34) & " in " & oSheet.Name & "!" & Firstcell.Row)
Set wksPasteTo = ActiveWorkbook.Sheets("final")
oSheet.Rows(Firstcell.Row).SpecialCells(xlCellTypeConstants).Select
Selection.Copy
wksPasteTo.Range("A" & wksPasteTo.Rows.Count).End(xlUp).Offset(1, 0).PasteSpecial (xlPasteValues)
On Error Resume Next
While (Not NextCell Is Nothing) And (Not NextCell.Address = Firstcell.Address)
Set NextCell = Cells.FindNext(After:=ActiveCell)
If Not NextCell.Address = Firstcell.Address Then
NextCell.Activate
'MsgBox ("Found " & Chr(34) & WhatToFind & Chr(34) & " in " & oSheet.Name & "!" & NextCell.Address)
oSheet.Rows(NextCell.Row).SpecialCells(xlCellTypeConstants).Select
Selection.Copy
wksPasteTo.Range("A" & wksPasteTo.Rows.Count).End(xlUp).Offset(1, 0).PasteSpecial (xlPasteValues)
End If
Wend
End If
Set NextCell = Nothing
Set Firstcell = Nothing
Next oSheet
End If
End Sub
[/VBA]

I'm not allowed to post attachments on this forum so here is the spreadsheet:
Sheet1 - Titled 05 Resources
<table border="0" cellpadding="0" cellspacing="0" width="832"><col style="width:48pt" span="13" width="64"> <tbody><tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt;width:48pt" height="20" width="64">First Name</td> <td class="xl63" style="width:48pt" width="64">Last Name</td> <td class="xl63" style="width:48pt" width="64">Visa Status</td> <td class="xl63" style="width:48pt" width="64">Company_Name</td> <td class="xl63" style="width:48pt" width="64">JobTitle</td> <td class="xl63" style="width:48pt" width="64">Company_Division</td> <td class="xl63" style="width:48pt" width="64">Rotation</td> <td class="xl63" style="width:48pt" width="64">City</td> <td class="xl63" style="width:48pt" width="64">State</td> <td class="xl63" style="width:48pt" width="64">JobFunction</td> <td class="xl63" style="width:48pt" width="64">Description</td> <td class="xl63" style="width:48pt" width="64">Industry</td> <td class="xl63" style="width:48pt" width="64">Description</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">FirstName1</td> <td>LastName1</td> <td>No Visa</td> <td>Company1</td> <td colspan="2" style="mso-ignore:colspan">Consultant</td> <td>No</td> <td>New York</td> <td>NY</td> <td>Consulting</td> <td>Consulting</td> <td>Financial Services</td> <td>Financial Services</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">FirstName2</td> <td>LastName2</td> <td>No Visa</td> <td>Company2</td> <td colspan="2" style="mso-ignore:colspan">Senior Associate</td> <td>No</td> <td>Atlanta</td> <td>GA</td> <td>Consulting</td> <td>Consulting</td> <td>Financial Services</td> <td>Financial Services</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">FirstName3</td> <td>LastName3</td> <td>No Visa</td> <td>Company3</td> <td>Assistant Marketing Manager</td> <td>Luxury Division</td> <td>No</td> <td>New York</td> <td>NY</td> <td>Marketing / Sales</td> <td>Brand Marketing</td> <td>Other Services</td> <td>Retailing & Wholesaling</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">FirstName4</td> <td>LastName4</td> <td>F-1</td> <td>Company4</td> <td>Senior Consultant</td> <td>Stategy & Operations </td> <td>No</td> <td>Atlanta</td> <td>GA</td> <td>Consulting</td> <td>Consulting</td> <td>Other Services</td> <td>Other</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">FirstName5</td> <td>LastName5</td> <td>No Visa</td> <td>Company1</td> <td>Consultant</td> <td>New Product Development Group</td> <td>No</td> <td>Atlanta </td> <td>GA</td> <td>Other</td> <td>Other </td> <td>Other Services</td> <td>Communications</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">FirstName6</td> <td>LastName6</td> <td>F-1</td> <td>Company2</td> <td colspan="2" style="mso-ignore:colspan">Product Manager</td> <td>No</td> <td>Norcross</td> <td>GA</td> <td>Marketing / Sales</td> <td>Marketing</td> <td>Manufacturing</td> <td>Computer/High Tech</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">FirstName7</td> <td>LastName7</td> <td>F-1</td> <td>Company3</td> <td>Assistant Vice President</td> <td>Global Transaction Services</td> <td>No</td> <td>New York</td> <td>NY</td> <td>Marketing / Sales</td> <td>Marketing</td> <td>Financial Services</td> <td>Financial Services</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">FirstName8</td> <td>LastName8</td> <td>No Visa</td> <td>Company4</td> <td colspan="2" style="mso-ignore:colspan">Pricing and Revenue Management Sr. Analyst</td> <td>No</td> <td>Plantation</td> <td>FL</td> <td>Marketing / Sales</td> <td>Brand Marketing</td> <td>Other Services</td> <td>Transportation </td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">FirstName9</td> <td>LastName9</td> <td>No Visa</td> <td>Company1</td> <td colspan="2" style="mso-ignore:colspan">Assistanta Brand Manager</td> <td>No</td> <td>Atlanta</td> <td>GA</td> <td>Marketing / Sales</td> <td>Brand Marketing</td> <td>Other Services</td> <td>Other</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">FirstName10</td> <td>LastName10</td> <td>No Visa</td> <td>Company2</td> <td>Subscription Services Analyst</td> <td>Interactive Sports</td> <td>No</td> <td>Atlanta</td> <td>GA</td> <td>Marketing / Sales</td> <td>Marketing</td> <td>Other Services</td> <td>Other</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">FirstName11</td> <td>LastName11</td> <td>No Visa</td> <td>Company3</td> <td>Integration Manager</td> <td>Southern Division Atlanta Region</td> <td>No</td> <td>Atlanta</td> <td>GA</td> <td>General Management</td> <td>General Management</td> <td>Other Services</td> <td>Communications</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">FirstName12</td> <td>LastName12</td> <td>No Visa</td> <td>Company4</td> <td colspan="2" style="mso-ignore:colspan">Investment Banking Associate</td> <td>No</td> <td>Charlotte </td> <td>NC</td> <td>Finance / Accounting</td> <td>Investment Banking</td> <td>Financial Services</td> <td>Investment Banking</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">FirstName13</td> <td>LastName13</td> <td>F-1</td> <td>Company1</td> <td colspan="2" style="mso-ignore:colspan">Proprietary Trader</td> <td>No</td> <td>New York</td> <td>NY</td> <td>Finance / Accounting</td> <td>Portfolio/Asset Management</td> <td>Financial Services</td> <td>Financial Services</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">FirstName14</td> <td>LastName14</td> <td>No Visa</td> <td>Company2</td> <td>Experienced Analyst</td> <td>Human Performance Workforce Transformation</td> <td>No</td> <td>Atlanta</td> <td>GA</td> <td>Consulting</td> <td>Consulting</td> <td>Consulting Services</td> <td>None</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">FirstName15</td> <td>LastName15</td> <td>F-1</td> <td>Company3</td> <td colspan="2" style="mso-ignore:colspan">Private Equity/ Investment Banking Associate</td> <td>No</td> <td>Washington </td> <td>DC</td> <td>Finance / Accounting</td> <td>Investment Banking</td> <td>Financial Services</td> <td>Investment Banking</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">FirstName16</td> <td>LastName16</td> <td>No Visa</td> <td>Company4</td> <td>Associate</td> <td>
</td> <td>No</td> <td>Atlanta</td> <td>GA</td> <td>Consulting</td> <td>Consulting</td> <td>Other Services</td> <td>Professional Services</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">FirstName17</td> <td>LastName17</td> <td>F-1</td> <td colspan="2" style="mso-ignore:colspan">Company1</td> <td>
</td> <td>No</td> <td>Richmond</td> <td>VA</td> <td>Finance / Accounting</td> <td>Industry Finance</td> <td>Financial Services</td> <td>Financial Services</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">FirstName18</td> <td>LastName18</td> <td>F-1</td> <td>Company2</td> <td>Global Management Program Associate</td> <td>Global Management Program</td> <td>Yes</td> <td>Atlanta </td> <td>GA</td> <td>Finance / Accounting</td> <td>Portfolio/Asset Management</td> <td>Financial Services</td> <td>Financial Services</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">FirstName19</td> <td>LastName19</td> <td>No Visa</td> <td>Company3</td> <td>Associate</td> <td>Investment Banking</td> <td>No</td> <td>Atlanta</td> <td>GA</td> <td>Finance / Accounting</td> <td>Investment Banking</td> <td>Financial Services</td> <td>Investment Banking</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">FirstName20</td> <td>LastName20</td> <td>No Visa</td> <td>Company4</td> <td colspan="2" style="mso-ignore:colspan">Senior Corporate Analyst</td> <td>No</td> <td>Kansas City</td> <td>MO</td> <td>Finance / Accounting</td> <td>Industry Finance</td> <td>Manufacturing</td> <td>Computer/High Tech</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">FirstName21</td> <td>LastName21</td> <td>No Visa</td> <td>Company1</td> <td>Marketing Manager</td> <td>Software Group</td> <td>No</td> <td>Atlanta</td> <td>GA</td> <td>Marketing / Sales</td> <td>Marketing</td> <td>Manufacturing</td> <td>Computer/High Tech</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">FirstName22</td> <td>LastName22</td> <td>No Visa</td> <td>COmpany4</td> <td colspan="2" style="mso-ignore:colspan">Consultant</td> <td>No</td> <td>New York</td> <td>NY</td> <td>Consulting</td> <td>Consulting</td> <td>Financial Services</td> <td>Financial Services</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> </tr> </tbody></table>Sheet 2-Titled 06 Resources
<table border="0" cellpadding="0" cellspacing="0" width="320"><col style="width:48pt" span="5" width="64"> <tbody><tr style="height:26.25pt" height="35"> <td class="xl65" style="height:26.25pt;width:48pt" height="35" width="64">First Name</td> <td class="xl65" style="border-left:none;width:48pt" width="64">Last Name</td> <td class="xl66" style="border-left:none;width:48pt" width="64">Employer</td> <td class="xl66" style="border-left:none;width:48pt" width="64">Job title</td> <td class="xl65" style="border-left:none;width:48pt" width="64">Location</td> </tr> <tr style="height:30.0pt" height="40"> <td class="xl67" style="height:30.0pt;border-top:none; width:48pt" height="40" width="64">Henry</td> <td class="xl67" style="border-top:none;border-left:none;width:48pt" width="64">LastName50</td> <td class="xl67" style="border-top:none;border-left:none;width:48pt" width="64">Company55</td> <td class="xl67" style="border-top:none;border-left:none;width:48pt" width="64">Consultant</td> <td class="xl67" style="border-top:none;border-left:none;width:48pt" width="64">Atlanta, GA</td> </tr> <tr style="height:52.5pt" height="70"> <td class="xl68" style="height:52.5pt;border-top:none; width:48pt" height="70" width="64">Shelby</td> <td class="xl67" style="border-top:none;border-left:none;width:48pt" width="64">LastName51</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Company1</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Senior Pharmaceutical Rep</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Atlanta, GA</td> </tr> <tr style="height:30.0pt" height="40"> <td class="xl68" style="height:30.0pt;border-top:none; width:48pt" height="40" width="64">James</td> <td class="xl67" style="border-top:none;border-left:none;width:48pt" width="64">LastName52</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Company2</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Senior Designer</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Atlanta, GA</td> </tr> <tr style="height:65.25pt" height="87"> <td class="xl68" style="height:65.25pt;border-top:none; width:48pt" height="87" width="64">David</td> <td class="xl67" style="border-top:none;border-left:none;width:48pt" width="64">LastName53</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Company43</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Senior Vice President Sales & Marketing</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Atlanta, GA</td> </tr> <tr style="height:78.0pt" height="104"> <td class="xl68" style="height:78.0pt;border-top:none; width:48pt" height="104" width="64">Hope</td> <td class="xl67" style="border-top:none;border-left:none;width:48pt" width="64">LastName54</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Company42</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Inventory Accuracy and Bin Stock Keeping Manager</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Atlanta, GA</td> </tr> <tr style="height:30.0pt" height="40"> <td class="xl68" style="height:30.0pt;border-top:none; width:48pt" height="40" width="64">Lisa</td> <td class="xl67" style="border-top:none;border-left:none;width:48pt" width="64">LastName55</td> <td class="xl67" style="border-top:none;border-left:none;width:48pt" width="64">Company55</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64"> </td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Atlanta, GA</td> </tr> <tr style="height:30.0pt" height="40"> <td class="xl68" style="height:30.0pt;border-top:none; width:48pt" height="40" width="64">Jonathan</td> <td class="xl67" style="border-top:none;border-left:none;width:48pt" width="64">LastName56</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Company1</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64"> </td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Atlanta, GA</td> </tr> <tr style="height:30.0pt" height="40"> <td class="xl68" style="height:30.0pt;border-top:none; width:48pt" height="40" width="64">Wayne</td> <td class="xl67" style="border-top:none;border-left:none;width:48pt" width="64">LastName57</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Company2</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">promotion</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Atlanta, GA</td> </tr> <tr style="height:30.0pt" height="40"> <td class="xl68" style="height:30.0pt;border-top:none; width:48pt" height="40" width="64">Jesus</td> <td class="xl67" style="border-top:none;border-left:none;width:48pt" width="64">LastName58</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Company43</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Corporate Controller</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Miami, FL</td> </tr> <tr style="height:30.0pt" height="40"> <td class="xl68" style="height:30.0pt;border-top:none; width:48pt" height="40" width="64">Sreenivasa</td> <td class="xl67" style="border-top:none;border-left:none;width:48pt" width="64">LastName59</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Company42</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64"> </td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Atlanta, GA</td> </tr> <tr style="height:52.5pt" height="70"> <td class="xl68" style="height:52.5pt;border-top:none; width:48pt" height="70" width="64">Sameer</td> <td class="xl67" style="border-top:none;border-left:none;width:48pt" width="64">LastName60</td> <td class="xl67" style="border-top:none;border-left:none;width:48pt" width="64">Company55</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Quality Fulfillment Process Leader</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Atlanta, GA</td> </tr> <tr style="height:30.0pt" height="40"> <td class="xl68" style="height:30.0pt;border-top:none; width:48pt" height="40" width="64">Jim</td> <td class="xl67" style="border-top:none;border-left:none;width:48pt" width="64">LastName61</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Company1</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Internet Manager</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Atlanta, GA</td> </tr> <tr style="height:30.0pt" height="40"> <td class="xl68" style="height:30.0pt;border-top:none; width:48pt" height="40" width="64">Walter</td> <td class="xl67" style="border-top:none;border-left:none;width:48pt" width="64">LastName62</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Company2</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64"> </td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Atlanta, GA</td> </tr> <tr style="height:30.0pt" height="40"> <td class="xl68" style="height:30.0pt;border-top:none; width:48pt" height="40" width="64">Patrick</td> <td class="xl67" style="border-top:none;border-left:none;width:48pt" width="64">LastName63</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Company43</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Associate</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Atlanta, GA</td> </tr> <tr style="height:78.0pt" height="104"> <td class="xl68" style="height:78.0pt;border-top:none; width:48pt" height="104" width="64">Taylor</td> <td class="xl67" style="border-top:none;border-left:none;width:48pt" width="64">LastName64</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Company42</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Director of Technology for New Products</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Atlanta, GA</td> </tr> <tr style="height:30.0pt" height="40"> <td class="xl68" style="height:30.0pt;border-top:none; width:48pt" height="40" width="64">Bradley</td> <td class="xl67" style="border-top:none;border-left:none;width:48pt" width="64">LastName65</td> <td class="xl67" style="border-top:none;border-left:none;width:48pt" width="64">Company55</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Design Engineer</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Atlanta, GA</td> </tr> <tr style="height:39.75pt" height="53"> <td class="xl68" style="height:39.75pt;border-top:none; width:48pt" height="53" width="64">Roger</td> <td class="xl67" style="border-top:none;border-left:none;width:48pt" width="64">LastName66</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Company1</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Senior Product Manager</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Atlanta, GA</td> </tr> <tr style="height:30.0pt" height="40"> <td class="xl68" style="height:30.0pt;border-top:none; width:48pt" height="40" width="64">Vincent</td> <td class="xl67" style="border-top:none;border-left:none;width:48pt" width="64">LastName67</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Company2</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Webmaster</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Atlanta, GA</td> </tr> <tr style="height:39.75pt" height="53"> <td class="xl68" style="height:39.75pt;border-top:none; width:48pt" height="53" width="64">Benjamin</td> <td class="xl67" style="border-top:none;border-left:none;width:48pt" width="64">LastName68</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Company43</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Finance Supervisor</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Atlanta, GA</td> </tr> <tr style="height:90.75pt" height="121"> <td class="xl68" style="height:90.75pt;border-top:none; width:48pt" height="121" width="64">Baerbel</td> <td class="xl67" style="border-top:none;border-left:none;width:48pt" width="64">LastName69</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Company42</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Corporate & Investment Banking Associate</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">Atlanta, GA</td> </tr> </tbody></table>sheet labeled "final" is blank and is where the final contents should be pasted
 
Last edited:

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
So had I searched for "Marketing" the sheet labeled "final" should contain:

<table border="0" cellpadding="0" cellspacing="0" width="896"><col style="width:48pt" span="14" width="64"> <tbody><tr style="height:15.0pt" height="20"> <td colspan="2" style="height:15.0pt;mso-ignore:colspan; width:96pt" height="20" width="128">05Resources</td> <td style="width:48pt" width="64">
</td> <td style="width:48pt" width="64">
</td> <td style="width:48pt" width="64">
</td> <td style="width:48pt" width="64">
</td> <td style="width:48pt" width="64">
</td> <td style="width:48pt" width="64">
</td> <td style="width:48pt" width="64">
</td> <td style="width:48pt" width="64">
</td> <td style="width:48pt" width="64">
</td> <td style="width:48pt" width="64">
</td> <td style="width:48pt" width="64">
</td> <td style="width:48pt" width="64">
</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl65" style="height:15.0pt" height="20">First Name</td> <td class="xl65">Last Name</td> <td class="xl65">Visa Status</td> <td class="xl65">Company_Name</td> <td class="xl65">JobTitle</td> <td class="xl65">Company_Division</td> <td class="xl65">Rotation</td> <td class="xl65">City</td> <td class="xl65">State</td> <td class="xl65">JobFunction</td> <td class="xl65">Description</td> <td class="xl65">Industry</td> <td class="xl65" colspan="2" style="mso-ignore:colspan">Description</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">FirstName3</td> <td>LastName3</td> <td>No Visa</td> <td>Company3</td> <td>Assistant Marketing Manager</td> <td>Luxury Division</td> <td>No</td> <td>New York</td> <td>NY</td> <td>Marketing / Sales</td> <td>Brand Marketing</td> <td>Other Services</td> <td colspan="2" style="mso-ignore:colspan">Retailing & Wholesaling</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">FirstName6</td> <td>LastName6</td> <td>F-1</td> <td>Company2</td> <td colspan="2" style="mso-ignore:colspan">Product Manager</td> <td>No</td> <td>Norcross</td> <td>GA</td> <td>Marketing / Sales</td> <td>Marketing</td> <td>Manufacturing</td> <td colspan="2" style="mso-ignore:colspan">Computer/High Tech</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">FirstName7</td> <td>LastName7</td> <td>F-1</td> <td>Company3</td> <td>Assistant Vice President</td> <td>Global Transaction Services</td> <td>No</td> <td>New York</td> <td>NY</td> <td>Marketing / Sales</td> <td>Marketing</td> <td>Financial Services</td> <td colspan="2" style="mso-ignore:colspan">Financial Services</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">FirstName8</td> <td>LastName8</td> <td>No Visa</td> <td>Company4</td> <td colspan="2" style="mso-ignore:colspan">Pricing and Revenue Management Sr. Analyst</td> <td>No</td> <td>Plantation</td> <td>FL</td> <td>Marketing / Sales</td> <td>Brand Marketing</td> <td>Other Services</td> <td colspan="2" style="mso-ignore:colspan">Transportation </td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">FirstName9</td> <td>LastName9</td> <td>No Visa</td> <td>Company1</td> <td colspan="2" style="mso-ignore:colspan">Assistanta Brand Manager</td> <td>No</td> <td>Atlanta</td> <td>GA</td> <td>Marketing / Sales</td> <td>Brand Marketing</td> <td>Other Services</td> <td>Other</td> <td>
</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">FirstName10</td> <td>LastName10</td> <td>No Visa</td> <td>Company2</td> <td>Subscription Services Analyst</td> <td>Interactive Sports</td> <td>No</td> <td>Atlanta</td> <td>GA</td> <td>Marketing / Sales</td> <td>Marketing</td> <td>Other Services</td> <td>Other</td> <td>
</td> </tr> <tr style="height:15.0pt" height="20"> <td colspan="2" style="height:15.0pt;mso-ignore:colspan" height="20">06Resources</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> </tr> <tr style="height:26.25pt" height="35"> <td class="xl66" style="height:26.25pt" height="35">First Name</td> <td class="xl66" style="border-left:none">Last Name</td> <td class="xl67" style="border-left:none;width:48pt" width="64">Employer</td> <td class="xl67" style="border-left:none;width:48pt" width="64">Job title</td> <td class="xl66" style="border-left:none">Location</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> </tr> <tr style="height:65.25pt" height="87"> <td class="xl69" style="height:65.25pt;border-top:none; width:48pt" height="87" width="64">David</td> <td class="xl68" style="border-top:none;border-left:none;width:48pt" width="64">LastName53</td> <td class="xl69" style="border-top:none;border-left:none;width:48pt" width="64">Company43</td> <td class="xl69" style="border-top:none;border-left:none;width:48pt" width="64">Senior Vice President Sales & Marketing</td> <td class="xl69" style="border-top:none;border-left:none;width:48pt" width="64">Atlanta, GA</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> </tr> </tbody></table>
 
Upvote 0

Forum statistics

Threads
1,224,574
Messages
6,179,633
Members
452,933
Latest member
patv

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