title: Find all non-zero cells in a given range and list their addresses in another sheet
body: <p>I have a gigantic table in excel(720x720) in which I want to find non-zero values. when the value is found I would like to get the first two cells of this row on a new sheet on two columns, the cell in question on a third and the first two cells in the columns of the cell I'm looking for on two other columns.</p>
  
  <p>For example if my values are in E26 R89 and Z9 on sheet 1 I would like to get a table on sheet 2 that would look like this:</p>
  
  <pre><code>      A      B      C     D     E
  1    A26    B26    E26    E1    E2   
  2    A89    B89    R89    R1    R2
  3    A9     B9     Z9     Z1    Z2
  </code></pre>
  
  <p>Here is what I've tried so far (please bear in mind that you are talking to a beginner)</p>
  
  <pre><code>Sub tests_selection()
      Dim r As Worksheet
      Dim c As Workbook, f As Worksheet
      Set c = Workbooks("classeur1")
      Set f = c.Worksheets("feuil1")
  
      Dim a(5200)
      Dim b
  
      b = 0
  
      Range("A1:AAU723").Select
      For i = 4 To 720
          For j = 4 To 723
              If f.Cells(i, j).Value &lt;&gt; 0 Then
              a(b) = f.Cells(i, j).Adress
              b = b + 1
              End If
  
          Next j
      Next i
  
      Set r = c.Worksheets("result")
  
      For i = 0 To b
          r.Cells(i, 1).Value = a(i)
      Next i    
  End Sub
  </code></pre>
  
  <p>Table example<br>
  <a href="https://i.stack.imgur.com/1mXqz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1mXqz.png" alt="Table example"></a></p>
  
  <p>Result example<br>
  <a href="https://i.stack.imgur.com/KTQHl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KTQHl.png" alt="Result example"></a></p>