title: How do I find a value in a row and return the column number with VBA?
body: <p>My excel sheet is filled with zeroes except for one cell in every row.<br>
  I want to find that cell and return the column.<br>
  For example: In the cell T616 is a value other than 0. May it be -15400.<br>
  I want to find that cell(T616) based on the row(616) and have the column returned(T). May it even be in a MsgBox.<br>
  This is my result of many tries and long Google-sessions:</p>
  
  <pre><code>Public Function find_Column(lRange As Range, lValue As String) As Integer
  Dim vCell As Range
  
  For Each vCell In lRange.Cells
  
  If vCell.Value = lValue Then
  find_Column = vCell.Column
  MsgBox (find_Column)
  Exit Function
  End If
  
  Next vCell
  
  End Function
  </code></pre>
  
  <p>I found this code somewhere and modified it a little bit, but I can't remember where. So thanks to the creator!<br>
  How do I search for a number other than 0?<br>
  I'm relatively new to VBA and don't really have an idea what I am doing. Sorry for my bad English (foreigner). I'd appreciate any help. Thank you!</p>