title: Looping through ranges in different sheets (Excel)
body: <p>I have two sheets: 'Project_Name' and 'Admin'. </p>
  
  <p>I also have a set of data on both. I have a code that attempts to loop through data in both sheets, but it does not work.</p>
  
  <p>Code works if loop is only done on one sheet, but not both. I am not sure what the problem is? </p>
  
  <pre><code>Dim val1 As String
  Dim val2 As String
  Dim val3 As String
  
  For i = 1 to LastRow
  
  With Worksheets("Project_Name")
    .Range(i, 1).Value = val1
    .Range(i, 2).Value = val2
  End With
  
  With Worksheets("Admin")
    .Range(i, 1).Value = val3
  End With
  
  Next i
  </code></pre>