I am trying to create a For Each Cell loop, inside another For Each Cell Loop. I have not been able to find answers for this anywhere, is this even possible? The outside loop is supposed to Pull data from different files which are listed in Data sheet, cells Z2 to Z4, I then want the inside for loops to work on the data (I have already written loads of other code inside which I need to apply to loads of excel files). I am not sure this outside loop even works as I haven't been able to run due to the error 'For Control Variable already in use'.
For Each Cell In ThisWorkbook.Worksheets("Data").Range("Z2:Z4")
Set OpenBook = "C:\Users\Yorke\VBA\" & Cell.Value & ".xls"
.............. 'Other code
For Each Cell In ThisWorkbook.Worksheets("Data").Range("J2:J") 'This is just an example, I have lots more other for loops working too
If Cell.Value = 0 Then Cell.Value = Cell.Offset(0, 1)
Next Cell
.............. 'Other code
Next Cell
For Each Cell In ThisWorkbook.Worksheets("Data").Range("Z2:Z4")
Set OpenBook = "C:\Users\Yorke\VBA\" & Cell.Value & ".xls"
.............. 'Other code
For Each Cell In ThisWorkbook.Worksheets("Data").Range("J2:J") 'This is just an example, I have lots more other for loops working too
If Cell.Value = 0 Then Cell.Value = Cell.Offset(0, 1)
Next Cell
.............. 'Other code
Next Cell