Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
214 views
Welcome To Ask or Share your Answers For Others

1 Answer

Use:

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

Or:

Sheet2.Cells(erow, 1).Value = Sheet1.Cells(i, 3).Value

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...