Hi guys,
Ik have found this it does almost what i need to do.
There is a formula row R11:Z11. VBA wil find the last empty rows and paste the formula there. The problem is that it does copy the exact row numbers starting row R11 then R12 etc.
I need it to just copy and use the row numbers where it is copied. I hope someone can help me with this.
Thanks,
Sub Fill_only_empty()
Dim LR As Long
LR = ActiveSheet.UsedRange.Find("*", SearchDirection:=xlPrevious, SearchOrder:=xlByRows).Row
With Range("R12:Z" & LR)
With .SpecialCells(xlCellTypeBlanks)
.Formula = Range("R11:Z11").Formula
End With
.Value = .Value
End With
End Sub
Ik have found this it does almost what i need to do.
There is a formula row R11:Z11. VBA wil find the last empty rows and paste the formula there. The problem is that it does copy the exact row numbers starting row R11 then R12 etc.
I need it to just copy and use the row numbers where it is copied. I hope someone can help me with this.
Thanks,
Sub Fill_only_empty()
Dim LR As Long
LR = ActiveSheet.UsedRange.Find("*", SearchDirection:=xlPrevious, SearchOrder:=xlByRows).Row
With Range("R12:Z" & LR)
With .SpecialCells(xlCellTypeBlanks)
.Formula = Range("R11:Z11").Formula
End With
.Value = .Value
End With
End Sub