1个EXCEL文件sheet1数据怎么取到sheet2里
发布网友
发布时间:2023-01-11 18:57
我来回答
共3个回答
热心网友
时间:2023-10-29 10:35
选取sheet2中某单元格,输入“=”,然后回到sheet1中,点取所需单元格,回车即可。
例“=Sheet1!A1”
热心网友
时间:2023-10-29 10:35
输入:"="后,点sheet1里相应的单元格,然后填充
热心网友
时间:2023-10-29 10:36
'关闭所有的Excel文档
'新建一个工作薄,运行下面的宏
Sub hebin()
On Error Resume Next
Dim fs, f, f1, fc, s
Set fs = CreateObject("Scripting.FileSystemObject")
Dim fd As FileDialog
Set fd = Application.FileDialog(msoFileDialogFolderPicker)
fd.Show
s = fd.SelectedItems(1)
Set f = fs.GetFolder(s)
Set fc = f.Files
For Each f1 In fc
If Right(f1.Name, 3) <> "xls" Then GoTo nt:
x = x + 1
Workbooks.Open f1.Name
Workbooks(1).Activate
Sheets(1).Activate
Cells(x, 1) = f1.Name
Cells(x, 2) = Workbooks(2).Sheets("Sheet1").Range("A1")
Workbooks(2).Close SaveChanges:=False
nt:
Next
End Sub