将 Excel (2007) 工作表复制到新工作簿,无需引用原始工作簿的公式
我有一本有两张纸的工作簿。第一个充满了数据和计算,第二个主要是引用第一个工作表的单元格。第二个工作表还连接字符串以及对工作表中单元格的引用,以形成在其他地方使用的 SQL 命令。
还有第二本练习册(很快就会有更多)。它的工作表与其他工作簿的第一张工作表相同,只是数据不同。我遇到的问题是新工作簿需要一张与原始工作簿的第二张类似的工作表(抱歉,如果这听起来令人困惑)。我想简单地复制工作表及其公式,我尝试使用“移动或复制...”选项。不幸的是,单元格中的公式引用了旧工作簿中的第一个工作表,如下所示:=[foobar.xlsx]data!A1。数据太多,无法手动删除它们。我不能只是重做公式,因为我必须从第二张表中删除许多特定行,因此拖动公式将无法正确匹配。我目前正在尝试将其与 REPLACE 一起破解,但如果有人可以提供帮助,我将不胜感激。
澄清: 当我复制工作表时,公式将显示为 =[foobar.xlsx]data!A1。我希望它只是数据!A1。
谢谢 :)
I have a workbook with two sheets. The first is full of data and calculations, the second is mostly cells with references to the first sheet. The second sheet also concatenates strings, and references to cells in the sheet, to form SQL commands used elsewhere.
There is also a second workbook (soon to be more). It has a sheet identical to the first sheet of the other workbook, except with different data. The problem I'm having is that the new workbook needs a sheet similar to the second of the original workbook (sorry if this is sounding confusing). I would like to simply duplicate the sheet and its formulas, which I tried using the 'move or copy...' option. Unfortunately, the formulas in the cells reference the first sheet from the old workbook, like this: =[foobar.xlsx]data!A1. Way too much data to remove them by hand. I can't just redo the formulas because I had to remove a lot of specific lines from the second sheet, so dragging the formula would not match up correctly. I'm currently trying to hack this together with REPLACE but if anyone can offer help it would be greatly appreciated.
CLARIFICATION:
When I copy the sheet, a formula will appear as =[foobar.xlsx]data!A1. I want it to just be data!A1.
Thanks :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我希望这能解决您的问题,但我有点不清楚您的需求!
突出显示工作表中的所有单元格。
执行替换,将 = 替换为 '=
这会阻止公式“成为公式”
复印该表。
在新工作表上执行另一次替换,将 '= 替换为 =
这将转换回公式,引用新工作簿中的单元格。
I hope this answers your problem, but I am a little unclear on your need!!!
Highlight all cells in the worksheet.
Perform a replace to replace = with say '=
This stops the formulas "being formulas"
Copy the sheet.
Perform another replace on the new sheet to replace '= with =
This converts back to formulas, referring to cells in your new workbook.