Hi,
I need a code, which will copy formula from given cell reference and paste the values to entire correspoding cells
Attached is sample file with the requirement.
kindly help.
Hi,
I need a code, which will copy formula from given cell reference and paste the values to entire correspoding cells
Attached is sample file with the requirement.
kindly help.
[VBA]Dim lastrow
With ActiveSheet
lastrow = .Range("A3").End(xlDown).Row
With .Range("D4").Resize(lastrow - 3)
ActiveSheet.Range("D2").Copy .Cells
.Value = .Value
End With
End With
[/VBA]
Hi Xld,
awesome, this code is working fine.
thank you very much for your help.
Regards,
hi
Can we have small modification, Formula should be copied if the cell value is blank
Regards
[VBA]Dim lastrow
With ActiveSheet
lastrow = .Range("A3").End(xlDown).Row
With .Range("D4").Resize(lastrow - 3).SpecialCells(xlCellTypeBlanks)
ActiveSheet.Range("D2").Copy .Cells
.Value = .Value
End With
End With[/VBA]
Hi Xld,
its working fine as intended. As your profile tag line states you are "Distinguished Lord of VBAX"
Regards