Okay, now I think I see what you want. If I am right, then you can do it using this single line of code...
More generally, where the cell reference could change, this macro...Code:Range(Range("D27"), Range("D27").End(xlToRight)).Formula = Range("D27").Formula
Where I assume you might change the starting cell for your extending the formula to the right... just change the Set code line as needed.Code:Sub ExtendFormulaToRight() Dim StartCell As Range Set StartCell = Range("D27") Range(StartCell, StartCell.End(xlToRight)).Formula = StartCell.Formula End Sub




Reply With Quote
Bookmarks