Most valuable professional
  • Hot Topics

Excel Assistance with copying and pasting rows to another sheet

Hi! I have an excel file and the first sheet "sheet1" contains almost 35000 rows and and 12 columns. Six of the columns have text and 6 have numbers or each row. I want to create a macro which will search for 2 strings (e.g. "serv" or "financ") in the 6 columns with text for each row. If one of the strings is found then I want the code to copy the row with the 12 columns in "sheet2". I tried to record the macro but it seems that I cannot find a solution. This is what I have so far: Sub search() ' ' search Macro Cells.Find(What:="serv", After:=ActiveCell, LookIn:=xlFormulas, LookAt _ :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _ False, SearchFormat:=False).Activate Rows("4:4").Select Selection.Cut Sheets("Sheet2").Select ActiveSheet.Paste Sheets("Sheet1").Select Could someone help me please? I would much appreciate it. thanks, Loukas

This question generated 20 answers. To proceed to the answers, click here.

This thread is current as of December 18, 2013.

For more resources for Microsoft Excel:

This article includes the following tags:

  • Excel
  • Microsoft Excel