title: Transfer data to database sheet from multiple worksheet of the same workbook
body: <p>I wan't to transfer data within a range from each worksheet of a workbook excluding specific worksheet names based on a value being greater than zero within a range. Based on the value being greater than zero I wan't to transfer corresponding column values in the same row and update the database sheet by putting the values under specific columns from all worksheets apart from specific sheet and populate the list in the database sheet. My code does not seem to be working.</p>
  <p><a href="https://i.stack.imgur.com/nYvfp.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nYvfp.jpg" alt="Data Extraction from each sheet" /></a></p>
  <pre><code> Sub Button4_Click()
  
     Dim sourceRng As Range
     Dim cell As Range
     Dim i As Long
     Dim ws As Worksheet
     Dim wsC As Worksheet
  
      Set wsC = Sheets(&quot;Database&quot;)
     For Each wkSht In ThisWorkbook.Worksheets
       If ws.Name &lt;&gt; &quot;Database&quot; And ws.Name &lt;&gt; &quot;Combine&quot; And ws.Name &lt;&gt; &quot;CETIN&quot; Then
      Set sourceRng = ActiveSheet.Range(&quot;AY17:AY30&quot;)
      i = 1
      For Each cell In sourceRng
       If cell.Value &gt; 0 Then
        cell.Resize(1, 1).Copy Destination:=wsD.Range(&quot;A&quot; &amp; i)
        i = i + 1
       End If
       Next cell
      End If
      Next
   End Sub
  </code></pre>