从excel中选择的选项卡中选择数据 [英] pick data from a chosen tab in excel

查看:95
本文介绍了从excel中选择的选项卡中选择数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下问题.我有一个带有许多标签的文件.每个标签的名称是一个国家,并且在标签中有关于该国家的各种数据.我想创建一个界面标签,用户可以在其中将国家/地区名称放入一个单元格(例如"France"单元格A1)中,将数据项放入另一个单元格(例如"Births")中,并且该界面将给出时间序列数据项(在我的示例中为出生").有没有一种方法可以使用Excel而不是VBA?我可以使用VBA来做到这一点,但是我需要一种仅Excel的方式来做到这一点.预先感谢.

I have the following problem. I have a file with many tabs. the name of each tab is a country and in the tab there are various data about the country. I would like to create an interface tab, where the user can put the country name in a cell (eg "France" cell A1), the data item in another cell (eg "Births") and the interface will give the time series of the data item ("Births" in my example). Is there a way to do it using Excel and not VBA? I can do it with VBA, but I need an Excel-only way to do it. Thanks in advance.

推荐答案

如果France位于A1中,而Births位于A2中,则需要一个具有工作表范围的命名范围,该范围在France工作表上称为Births.然后,您可以使用 INDIRECT函数将地址拼凑起来.

With France in A1 and Births in A2, you would need a named range with worksheet scope called Births on the France worksheet. Then you can use the INDIRECT function to piece the address together.

=indirect("'" & a1 & "'!" & a2)

但是您可能不想为每个工作表创建所有这些命名范围.您需要在每个工作表上提供对数据布局的更好描述,以获取更多具体帮助.

But you probably do not want to make all of those named ranges for every worksheet. You will have to provide a better description of your data layout on each worksheet for more specific assistance.

这篇关于从excel中选择的选项卡中选择数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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