I have a list of values which I want to be part of my Header names.
The problems is the code cycles through all the names for each worksheet, rather than matching worksheet 3 to d8 and 4 to d9 etc.
The problems is the code cycles through all the names for each worksheet, rather than matching worksheet 3 to d8 and 4 to d9 etc.
Code:
Sub RenameRows() Dim Wkb As Workbook
Dim ws As Sheets
Set Wkb = ThisWorkbook
Set ws = ThisWorkbook.Worksheets
Dim i As Integer
Dim j As Integer
ws_count = Wkb.Worksheets.Count
For i = 3 To ws_count
For j = 8 To 55
Wkb.Worksheets(i).Range("A1") = ws(i).Name & " " & Sheets("Cost of Cover").Cells(j, 4)
Next
Next
End Sub