My original program is able to find the Cells I need based on Month and Week now I need to modify the program to copy the last used cell in Row 5 and paste it until the end of the column.
Ex. If the month if November and it is the 4th week then the program knows to go there and fill in the information. I cannot figure out how to paste value from Nov wk 4 into the rest of the column. Also my range could be H5:BA5 or BC5:DB5 depending on where the month and week start.
I have added a picture that shows how my data is set up, the highlighted cells need to be filled in until the end
With ThisWorkbook.Sheets(SheetName)
Dim c2 As Integer
Dim LastCol2 As Integer
c2 = 2
LastCol2 = .Cells(4, .Columns.Count).End(xlToLeft).Column
Do Until .Cells(1, c2).Value = "Sept" And .Cells(4, c2).Value = "Wk 5"
If .Cells(1, c).Value = MonthSel And .Cells(4, c).Value = WkSel Then
.Cells(5, c2).Select
Selection.copy
ActiveCell.Offset(0, 1).Select
Selection.Paste
Application.CutCopyMode = False
Selection.AutoFill Destination:=Range("H5:BA5"), Type:=xlFillDefault
Range("H5:BA5").Select // need to change this range to reach the end of column 5
End If
Loop
End With