开发者

Excel VBA: Copy rows from another workbook, but just the function results

I want to copy 10 rows from a workbook into a new workbook. The cop开发者_JAVA技巧y & paste is fine, but in the copied cells are some formulas that I need to replace with the results.

Is there a magical way to copy only the displayed values from the cells?

This is how I do it now:

Rows("2:11").Select
Selection.Copy
myWorkbook.Sheets(1).Activate
ActiveSheet.Rows("1:10").Select
ActiveSheet.Paste


Rows("2:11").Copy
myWorkbook.WorkSheets(1).Rows("1:10").PasteSpecial xlPasteValues
Application.CutCopyMode = False
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜