title: Check if there's been data copied/pasted from a excel file (VBA)
body: <p>Im going to start by telling what my intention was with this code</p>
  
  <p>In my job we have to open every sales order that will be sent in that day and check for the itens to be shipped manually.
  Since its very time consuming i tought in creating a worksheet that it will look for the itens in every sales order and copy/paste in my master so i can know what i need to get.</p>
  
  <p>However to my sheet works I had to make a few changes in the Sales order, but now I want to create a error check, that if the file that it was open was an older SO it will tell me its order number so later i can check it.
  Also i want to check if by some reason nothing was found in that SO.</p>
  
  <p><strong>Now ill explain what my code does</strong> (I have a little knowledge in coding and in excel vba, so please dont judge my ugly script)</p>
  
  <p>Using the value of a cell in a range, it will open the folder and file that matches it's value, then will look for a specific range and for a specific cell value, in this case "Perfil", if this value is found it will copy some cells.</p>
  
  <p>After looking for that file it will open another one and do the same.</p>
  
  <p>However if "Perfil" is not found it wont copy and paste anything and it will just go to the next file.</p>
  
  <pre><code>Public Sub test()
  On Error GoTo Errormsg
  
  Dim wbk As Workbook
  Dim Fonte As Workbook
  Dim Dest As Workbook
  Dim Filename As String
  Dim FolderName As String
  Dim Arquivo As String
  Dim Path As String
  Dim celula As Range
  Dim cll As Range
  Dim Inicio As Range
  Dim Fim As Range
  Dim OffInicio As Range
  Dim OffFim As Range
  Dim busca As Range
  
  
  Application.ScreenUpdating = False
  
  Set Dest = Workbooks("testee.xlsm")
  Path = 'My file path
  
  lrow = Sheets(1).Range("A" &amp; Sheets(1).Rows.Count).End(xlUp).Row
  
  For Each celula In Dest.Worksheets(1).Range("A3:A" &amp; lrow)
  
      Dest.Sheets(1).Activate
      Pedido = Cells(celula.Row, 1)
      FolderName = Pedido &amp; "*"
      Arquivo = "\" &amp; Pedido
  
      Folder = Dir(Path &amp; FolderName, vbDirectory)
      Filename = Dir(Path &amp; Folder &amp; Arquivo &amp; "*.xlsx")
  
      Set wbk = Workbooks.Open(Path &amp; Folder &amp; "\" &amp; Filename, 0)
      Set Fonte = Workbooks(Filename)
  
      Fonte.Activate
  
  
      Set Inicio = Fonte.Worksheets(1).Cells.Find(what:="MODO DE FIXAÇÃO DO PRODUTO")
      Set Fim = Fonte.Worksheets(1).Cells.Find(what:="OBSERVAÇÕES")
      Set OffInicio = Inicio.Offset(1, 0)
      Set OffFim = Fim.Offset(-1, 1)
      Set busca = Range(OffInicio, OffFim).Columns(5)
      Set check = Range(OffInicio, OffFim).Columns(9)
  
          Range(OffInicio, OffFim).Columns(5).Select
  
          Set busca = Selection
  
      For Each cl In busca
          tipo = Cells(cl.Row, 5).Value
  
          If tipo = "Perfil" Then
  
          tamanho = Cells(cl.Row, 6).Value
          expessura = Cells(cl.Row, 11).Value
          cor = Cells(cl.Row, 12).Value
  
          lrow2 = Dest.Sheets(2).Range("D" &amp; Dest.Sheets(2).Rows.Count).End(xlUp).Row
          linha = lrow2 + 1
  
          Dest.Sheets(2).Range("D" &amp; linha).Value = Pedido
          Dest.Sheets(2).Range("E" &amp; linha).Value = tamanho
          Dest.Sheets(2).Range("H" &amp; linha).Value = cor
  
          End If
  Next cl
  
  End If
  
  Next celula
  
  Errormsg:
  lrow2 = Dest.Sheets(2).Range("D" &amp; Dest.Sheets(2).Rows.Count).End(xlUp).Row
  linha = lrow2 + 1
  
  Dest.Sheets(2).Range("D" &amp; linha).Value = Pedido
  Dest.Sheets(2).Range("E" &amp; linha).Value = "Pedido com modelo Antigo"
  
  End Sub
  </code></pre>
  
  <p>I want to know the files that no data has been copied, so I can check manually and see why it wasnt.
  To do that i tought in checking if in that file any data has been copied and pasted in my master sheet, if nothing was done it will send a message in a cell telling its number so i can check it later. </p>
  
  <p><strong>Now is my question:</strong>
  I dont know if is possible to check if anything was pasted from that file, in case is possible, how i do that?</p>
  
  <p>I cant just check if "Perfil" exists because for my sheet works I had to change a few things in the sheets that had the data I needed, and "perfil"is not something that the older version of it had. </p>
  
  <p>Also in my new version "Perfil"is not the only value that the column can have so i cant just check if perfil is not found there.</p>