简体   繁体   中英

Copy cell values (not cell formula)

I just need help to get this right. When i copy the macro copy all ( including formulas ) and what i want is just to copy the values. Can any one help?

Sub Gerar()

    Range("B28:AR29").Select
    Selection.Copy
    Sheets("testettt").Select
    Range("B22:AR23").Select
    ActiveSheet.Paste
    Application.CutCopyMode = False
    Selection.EntireRow.Insert , CopyOrigin:=xlFormatFromLeftOrAbove
    Sheets("Dados Pessoais + Exper. Prof").Select
    Range("A3").Select

End Sub

May be try this:

Range("B28:AR29").Select
Selection.Copy
Sheets("testettt").Select
Range("B22:AR23").Select
ActiveSheet.PasteSpecial xlPasteValues

You can directly copy and paste the range from one sheet to other, check the below code:

Sub try()

Worksheets("Sheet1").Range("B15:B25").Copy

Worksheets("Sheet2").Range("B15:B25").PasteSpecial xlPasteValues
Application.CutCopyMode = False

End Sub

This above code is only for copy paste, you remaining code is not included in this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM