The code below should enter a formula beginning in column O (15th column) followed by every other column until the 93rd column on the "Winshuttle" worksheet. Instead, the code is starting on column S or V. How do I get this to start in the 15th column?
Please see attached for example.![]()
Sub QtyFillDown() Dim QCol As Long, QLastrow As Long With Worksheets("Winshuttle") QLastrow = .Range("J" & Rows.Count).End(xlUp).Row For QCol = 15 To 93 Step 2 .Range(.Cells(2, QCol), .Cells(QLastrow, QCol)).Formula = _ "=IF(VLOOKUP($J2,Template," & QCol / 2 + 2 & ",FALSE)="""","""",VLOOKUP($J2,Template," & QCol / 2 + 2 & ",FALSE))" Next QCol End With End Sub











LinkBack URL
About LinkBacks
Register To Reply
Bookmarks