Is it possible to name a range on a sheet that does not exist yet?

蹲街弑〆低调 提交于 2020-01-16 11:54:09

问题


I am trying to create a named range for a worksheet that does not yet exist in the workbook. I will be using a macro to import a user-defined text file as the source.

Am I restricted to only defining these named ranges once the worksheet has been imported, or can I name a future range on a sheet that does not exist yet?


回答1:


In Refers to:

=INDIRECT("NotYetASheet!$A$1")



回答2:


I'm assuming the names will be created upon import of the data. I'm also assuming it's ok if your unnamed ranges return errors until the data has been imported. You can manage this using the IFERR or IFERROR functions.

Enter the following in a cell of a new worksheet:

=notyetnamed

Then select another cell, enter any old value, and give it the name notyetnamed.

I hope this answers your question. If not, you're welcome to clarify and I'll do my best to help.



来源:https://stackoverflow.com/questions/15079169/is-it-possible-to-name-a-range-on-a-sheet-that-does-not-exist-yet

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!