Excel macro paste just values

2019-08-23 05:44发布

I written macro which copy date from one sheet to other.

Sheet1.Cells(i, 3).Copy
Sheet1.Paste Destination:=Sheet2.Cells(erow, 1)

But in sheet 1 are formulas and I want to copy just values. How to change this code to solve my needs?

1条回答
小情绪 Triste *
2楼-- · 2019-08-23 06:42

Use:

Sheet1.Cells(i, 3).Copy
Sheet2.Cells(erow, 1).PasteSpecial xlPasteValues

Or:

Sheet2.Cells(erow, 1).Value = Sheet1.Cells(i, 3).Value
查看更多
登录 后发表回答