Excel从某些单元格中提取数据
我有一个文件,我只想在整个文件中以某种模式提取单元格 B9、B19、B29 等。我更希望将其提取到不同的 Excel 文件或以某种方式,以便我可以仅使用另一个 Excel 工作表中的那些单元格进行操作。
潜在地,我可能有几个 Excel 文件,我可能需要做这类事情,所以如果有一种方法可以让我在很多文件中具有相同的格式,我总是可以提取单元格 B9、B19、B29,那就太好了。任何帮助表示感谢,
如果可能的话,我正在寻找语法
编辑
正在思考是否可以以某种方式制作一个excel IF语句说如果行中有一个9并且该行是B然后将其打印在某处但我希望它打印在列中
编辑2 我只想要 B 列,而不是我之前提到的 A 列。 B9、B19、B29、B39 贯穿整个文件
I have a file that I only want to extract cells B9, B19, B29, etc etc etc in a pattern throughout the entire file. I would preferably like it to be extracted to a different excel file or someway so that I can do stuff with only those cells in another excel worksheet.
Potentially, I may have several excel files that I may need to do this sort of thing so if there were a way where I had the same format throughout a lot of files that I could always extract cells B9, B19, B29 that would be great. any help appreciated
I looking for syntax if possible
EDIT
Was thinking if I could somehow make an excel IF statement saying if Row has a 9 in it and the row is B then print it somewhere but I want it printed in a column
EDIT 2
I just want column B not A like I mentioned before.
B9, B19,B29,B39 through the whole file
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
以防万一你想用代码来做到这一点:
Just in case you want to do it with code:
您可以使用间接函数。它将单元格引用作为文本字符串并返回该单元格中的值。 而不是使用
来获取单元格 a9 中的工作表“数据”中的值
。您还可以使用 r1c1 表示法,如下所示
因此,您可以使用 ROW 和 COLUMN 函数以 10 为步长,
:输出表 A1 中的公式,然后复制并粘贴它,它将为您提供单元格 A1、A2、A3 中的 data!A9、data!A19、data!A29、... 中的值...具体取决于关于如何如果您希望排列输出,则可能必须修改单元格引用字符串。
You could use the INDIRECT function. It takes a cell reference as a text string and returns the value in that cell. So instead of using
to get the value in sheet "data" in cell a9, you use
You can also use r1c1 notation, like this:
From there you can use the ROW and COLUMN functions to go in steps of 10:
If you put this formula in A1 of your output sheet and then copy and paste it down and across, it will give you the values in data!A9, data!A19, data!A29,... in cells A1, A2, A3... Depending on how you want your output arranged, you might have to modify the cell reference string.
根据您想要执行此操作的频率取决于您需要如何执行此操作,如果是其中之一,一些简单的 Excel 命令可能会有所帮助。
例如,
在单元格 C1 中输入以下内容:
然后将其复制到数据的底部。该命令将返回数字 1 到 0。然后,您可以过滤 C 列(值为 9)上的数据,然后选择可见行并将数据复制到新工作表。
希望这有帮助。
Depending on how often you want to do this depends on how you need to do it, if it's a one of them some simple excel commands might help.
e.g.
In Cell C1 put the following:
then replicate this down to the bottom of your data. the command will return the numbers 1 through to 0. You can then filter the data on column C where value is 9 then select the visible rows and copy the data to a new sheet.
Hope this helps.