简体   繁体   English

将单元格值(非公式)从一张纸复制并粘贴到另一张纸

[英]Copy and paste cell values (not formulae) from one sheet to another

I am trying to copy and paste the values of a large number of cells from one sheet to another. 我正在尝试将大量单元格的值从一张纸复制并粘贴到另一张纸。 I tried 我试过了

Sheets("Sheet1").Range("A1:Z150").Copy Destination:=Sheets("Backup").Range("A1")

It copies the formulae instead. 而是复制公式。

Adding .Value results in the error Object required . 添加.Value导致错误Object required

I also tried. 我也试过了。

Sheets("Sheet1").Range("A1:Z150").Value = Sheets("Backup").Range("A1").Value

How do I copy cell values? 如何复制单元格值?

如果要使用value ,则两个范围的大小应相同:

Sheets("Sheet1").Range("A1:Z150").Value = Sheets("Backup").Range("A1:Z150").Value

You can try this: 您可以尝试以下方法:

Sheets("Sheet1").Range("A1:Z150").Copy
Sheets("Backup").Range("A1").PasteSpecial xlValues

You could use Address property of Range object to be sure to reference the same address in different ranges: 您可以使用Range对象的Address属性来确保引用不同范围内的相同地址:

With Sheets("Sheet1").Range("A1:Z150")
    Sheets("Backup").Range(.Address).Value = .Value
End With 

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用粘贴在某些条件下将单元格值从一张纸复制到另一张纸 - Copy Cell values from One Sheet to Another on certain criteria with the paste 从一个工作表复制单元格并粘贴到另一个工作表中到可变单元格 - Copy cells from one sheet and paste in another to a variable cell 根据特定条件将特定单元格值从一个工作表复制粘贴到另一个工作表 - Copy paste specific cell values from one work sheet to another based on a specific criteria 一次将一个单元格从列表复制并粘贴到另一张工作表 - Copy and Paste one Cell at a time from a list to another sheet VBA仅将某些值的单元格从一张纸粘贴到另一张纸 - VBA to paste only certain values of cell from one sheet to another 将单元格值从一张表复制并粘贴到另一张表 - Copy and Pasting the Cell Values from one sheet to another Sheet 从另一张纸上的单元格值复制同一张纸中范围的一部分的粘贴范围 - Copy Range From One Sheet Paste Part of Range In Same Sheet Based On Cell Value On Another Sheet 在每个工作表匹配的单元格上复制一个单元格并将其粘贴到另一个VBA - Copy a cell on one sheet and paste it on another VBA based on cell from each sheet matching 从一个单元格中查找值,从该单元格附近的单元格中复制值,然后将其粘贴到另一张纸上 - Find value from one cell, copy value from cell near to that cell and paste it to another sheet 根据单元格colorindex从一个工作表的粘贴范围复制范围到另一工作表的另一工作表 - Copy Range From One Sheet Paste Part of Range In another Sheet Based On Cell colorindex
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM