Forum Discussion

Suze61's avatar
Suze61
Copper Contributor
May 24, 2019

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

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
    http://www.vba-tanker.com

Resources