将特定单元格从一个工作表复制并粘贴到另一个工作表 [英] Copy and Paste Specific Cells from one worksheet to another

查看:83
本文介绍了将特定单元格从一个工作表复制并粘贴到另一个工作表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个电子表格Sheet1,如图1所示,其中有一些带有单元格值的行.尝试在Excel中将单元格从一个工作表复制并粘贴到另一个工作表时遇到问题.如下面的图1所示,我有一排带有值的行,我想从Sheet1复制单元格并将其粘贴到Sheet2,如图2所示.

I have a spreadsheet Sheet1 I have a row with some cell values as shown in Image 1. I am having a problem trying to copy and paste cells from one worksheet to another in excel. As shown in the below Image 1, I have a row with values and I want to copy the cells from Sheet1 and paste it to Sheet2 as shown in Image 2.

有人可以告诉我该怎么做吗?

Can anyone please tell me how to do that?

推荐答案

在Sheet2的第一个单元格中,写:

For the first cell on Sheet2, write:

=Sheet1!A4

然后另外两个如下:

=Sheet1!D4
=Sheet1!G4

也就是说,即使更新Sheet1上的值也要具有相同的值.如果没有,也许您想要vba代码?创建一个新模块:

That is, if you want to have the same values even if you update the ones on Sheet1. If not, perhaps you want vba code? Create a new module:

sub copy()

dim sheet1 as Worksheet, sheet2 as Worksheet

sheet1 = Worksheets("Sheet1")
sheet2 = Worksheets("Sheet2")
sheet2.Cells(1,"A").Value=sheet1.Cells(4,"A").Value
sheet2.Cells(2,"A").Value=sheet1.Cells(4,"D").Value
sheet2.Cells(3,"A").Value=sheet1.Cells(4,"G").Value

end sub

这篇关于将特定单元格从一个工作表复制并粘贴到另一个工作表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆