title: Excel VBA: Loop through column to identify row for data entry
body: <p>I am trying to create a table that sorts data by a date range (week). I have a userform that has a combo box that lists the date ranges that are existing in the table. From there, there are a few text boxes I would enter numbers into. My goal is to have a macro that loops through the rows in the table and stops when it reaches the row with the corresponding date range, then adds the values in the text boxes to corresponding cells in that row. I think I have the loop set up:</p>
  
  <p>** Updated Code:</p>
  
  <pre><code>Private Sub Submitb_Click()
  
  
  intLastCol = Sheets("Sheet1").Cells(1, Columns.Count).End(xlToLeft).Column
  intLastRow = Sheets("Sheet1").Cells(Rows.Count, 1).End(xlUp).Row
  For i = 2 To intLastRow
      If Sheets("Sheet1").Cells(i, 4).Value = ComboBox1.Value Then
          For j = 5 To intLastCol
              Sheets("Sheet1").Cells(i, j).Value = Sheets("Sheet1").Cells(i, j).Value + Controls("Textbox" &amp; 1).Value
          Next j
      End If
  Next i
  
  UserForm1.Hide
  Call Form_Initialize
  
  End Sub
  </code></pre>
  
  <p>That currently adds the value of the first textbox to all 4 cells in the row... Any ideas on how to fix that?</p>