i have division names on sheet "Unique branches"
i have tried to write code to copy the division header and division name to the sheet with the same name in Cells Q1 & Q2 but cannot get it to do this
Sub copy_BranchNanmestoSheets()
clear_BranchNames
Dim I As Long
With Sheets("Unique Branches").Cells(2)
.Parent.AutoFilterMode = False
For I = 5 To Sheets.Count
.AutoFilter 1, Sheets(I).Name
.Copy Sheets(I).[q1]
.AutoFilter
Next
End With
End Sub
Sub clear_BranchNames()
Dim I As Long, wks As Worksheet
For I = 5 To Sheets.Count
With Worksheets(I).Range("Q1:Q2")
.ClearContents
End With
Next I
End Sub
It would be appreciated if someone could kindly assist me
Bookmarks