作者:陈雅洁惠真慧瑋 | 来源:互联网 | 2023-05-18 17:44
WhatdoIwantistocopyanentirerowscontentsandformattingtoanothersheet.我想要的是将整行的内容和格式复制
What do I want is to copy an entire row's contents and formatting to another sheet.
我想要的是将整行的内容和格式复制到另一张表。
At the moment I've had to settle for setting the old cells contents to the new cells contents and in doing so it only copies the contents and not the formatting. (my cells have different colours that need to be carried across)
目前我不得不解决将旧单元格内容设置为新单元格内容的问题,这样做只会复制内容而不是格式化内容。 (我的细胞有不同的颜色,需要携带)
At the moment I have the following: (this works fine for cells in the same sheet)
目前我有以下内容:(这适用于同一张表格中的单元格)
Range(Cells(45, 2), Cells(45, 3)).Copy Range(Cells(50, 2), Cells(50, 3))
However, I'm trying to do it from one sheet to another. (Copy from sheet 'Front_Page' to 'vg'). I tried using the following, obviously it doesn't work, but can someone please tell me what am I doing wrong?
但是,我正试图从一张纸到另一张纸。 (从工作表'Front_Page'复制到'vg')。我尝试使用以下,显然它不起作用,但有人可以请告诉我我做错了什么?
Range.Worksheet("Front_Page").Range(Cells(45, 2), Cells(45, 3)).Copy Worksheet("vg").Range(Cells(50, 2), Cells(50, 3))
2 个解决方案