title: VBA macro to move cells to a new sheet Excel based on cell content
body: <p>I look around and could not find the specific response I need. So I will ask.
  I have a sheet (sheet1) with data only on column A. It looks like this:</p>
  
  <p><img src="https://i.stack.imgur.com/pKkT3.png" alt="enter image description here"></p>
  
  <p>And I need to create a VBA macro that searches in column A for any cell that contains ID, TITL, and AUTH.
  And move them to a specific column in another sheet(sheet2). Sheet2 will have 3 columns: ID, Title and Author.</p>
  
  <p>The thing is that along with copying the data of the cell to its specific column in sheet2, it also needs to delete the first part of the data. For example:
  ID: R564838 in sheet1 needs to be moved to the ID column in sheet2, without the "ID:" in it. So only R564838 would need to be moved.
  Also "TITL:" and "AUTH:" would need to be removed when copied.</p>
  
  <p>I hope this makes sense. I am just learning VBA macros. So I have no idea how to accomplish this. </p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I have this code:</p>
  
  <pre><code>Sub MoveOver() 
  
  Cells(1, 1).Activate 
  
  
  While Not ActiveCell = "" 
  
      If UCase(Left(ActiveCell, 4)) = "  ID" Then Sheets(2).Range("A" &amp; Rows.Count).End(xlUp).Offset(1, 0).Value = _ 
      Trim(Mid(ActiveCell, InStr(1, ActiveCell, ":") + 1, Len(ActiveCell))) 'Move ID to Col A in sheet 2
  
      If UCase(Left(ActiveCell, 4)) = "TITL" Then Sheets(2).Range("B" &amp; Rows.Count).End(xlUp).Offset(1, 0).Value = _ 
      Trim(Mid(ActiveCell, InStr(1, ActiveCell, ":") + 1, Len(ActiveCell))) 'Move TITL to Col B in sheet 2
  
      If UCase(Left(ActiveCell, 4)) = "AUTH" Then Sheets(2).Range("C" &amp; Rows.Count).End(xlUp).Offset(1, 0).Value = _ 
      Trim(Mid(ActiveCell, InStr(1, ActiveCell, ":") + 1, Len(ActiveCell))) 'Move AUTH to Col C in sheet 2
  
      ActiveCell.Offset(1, 0).Activate 
  
  Wend 
  </code></pre>
  
  <p>End Sub </p>
  
  <p>And it works. But there are some AUTH and TITL in sheet1 that are blank. And the situation is that when this runs, it doesn't leave a empty cell whenever AUTH or TITL are blank.
  I need the macro to leave an empty cell if AUTH or TITL are blank so the information matches for each book.
  I hope you understand my issue.</p>
  
  <p>Thank you again!</p>