How do I copy data only from 1 sheet to another without copying over functions & formulas new sheet

Copper Contributor

I need to copy data from one sheet to another as the cells have corrupted.  I only want the data to copy in into the sheet without overwriting the new sheets functions and formulas ?

1 Reply

@Suze61 

Hi suze,
use the following macro from my vba-tanker.

 

Sub CopyOnlyData()
Dim rngCell As Range

With Sheet1

For Each rngCell In .UsedRange

If rngCell.HasFormula = False Then

Sheet2.Range(rngCell.Address).Value = rngCell.Value

End If

Next rngCell

End With

End Sub

 

Regards
Bernd
www.vba-tanker.com