Is it possible to have arrays of names for different ranges in Excel? The idea is I have 2 tables of the same size in different sheets and I would like to call them, say table(1) and table(2) so that calculations are performed with either table according to the selected value from a combobox.
Lottery is a tax on people who are bad at maths
If only mosquitoes sucked fat instead of blood...
To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)
you could add a new name tot he worksheet that refers to either table(1) or table(2), dependant on the checkbox value.
This is not easy to explain, so I've included an example.
There are 2 base named ranges, TABLE1 and TABLE2.
The checkbox is linked to another named range called TOGGLE_TABLE.
Then I added a new name, called SELECTED_TABLE, with the following formula
Code:
=IF(TOGGLE_TABLE,TABLE2,TABLE1)
This formula driven name will change its reference based on the checkbox value.
Declan
Don't forget to mark your Thread as resolved.
Take a moment to rate posts that you think are helpful
Yes, that's what I need but I thought maybe I could use the same name for all my tables. If some time in the future I need to add supplementary tables to the spreadsheet then arrays make it easier to implement. Or maybe, on second thoughts, your method is just as easy... Thanks!
For now I won't mark the thread resolved yet, just in case someone may come up with an unexpected trick.
Lottery is a tax on people who are bad at maths
If only mosquitoes sucked fat instead of blood...
To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)
You could dynamically change the value of the RefersToRange Property of the Name object.
I'll take a look at this property...never used it before.
Lottery is a tax on people who are bad at maths
If only mosquitoes sucked fat instead of blood...
To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)
Lottery is a tax on people who are bad at maths
If only mosquitoes sucked fat instead of blood...
To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)