title: Searching all cells in a column Excel with vbscript
body: <p>I wrote a vbScript to gather computer information for each user's computer on login, and Id like to have the script record the information to an Excel sheet on the server, with each computer having its own row.</p>
  
  <p>I wrote this like 6 years ago but lost the script and havent touched vbScript since.</p>
  
  <p>So what I need to do is, </p>
  
  <ol>
  <li>check all the cells in column B (which would be computer name) that have a value</li>
  <li>compare that value to value saved for the computer's name</li>
  <li>if it matches, write the  computer info to that row</li>
  <li>if there are no matches, then write the info to the first empty row</li>
  </ol>
  
  <p>I have no idea where to start since vbScript is pretty foreign to me.</p>
  
  <p>Edit - I have this loop so far and that echo to test it, but it only goes to 1, while I have like 6 rows with values in column 0. I tried that conditional to check the cell value for a value I know exists and I get a runtime error.</p>
  
  <pre><code>Set objExcel = CreateObject("Excel.Application")
  Set objWorkbook = objExcel.Workbooks.Open("test.xlsx")
  Do While objExcel.ActiveCell.Offset(iRow,0).Value&lt;&gt;""
     WScript.Echo iRow
     If objExcel.Cells(iRow,0).Value = "three" Then
      WScript.Echo "three"
     End If
     iRow = iRow+1
  Loop
  WScript.Quit
  </code></pre>