Name manager - adding data manually as reference

Metty

New Member
Joined
Nov 6, 2019
Messages
15
Hello,

Normally we create named ranges by referring to excel lists - we select the data range that is located in certain cells in worksheets.

I tried to create named ranges by manually adding data to "refer to" part. But it didn't work - all the data that I added appeared in one cell, so not as a list.

I would like to know if there a way for adding data manually to "refer to" part and then use this list as named range whenever we need.

We can do it when we create custom lists, but these lists have no name. That's why I need named range for using it in different formulas.

Thank you in advance.
 

Some videos you may like

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
34,692
Office Version
365, 2019, 2016, 2010
Platform
Windows, MacOS
It will depend on how you want to use the names, but you can create arrays by enclosing the data in {}, so for example, you could use:

={1,2,3,4,5}

as the refers to, or for text:

={"Item1","Item2","Item3"}

Note that the quotes go round each item, not around the whole thing.
 

jasonb75

Well-known Member
Joined
Dec 30, 2008
Messages
8,067
Office Version
2019
Platform
Windows
It might work if you set the the 'refers to ' range as an array constant, I haven't tried this so no guarantee. It looks like you're trying to make something simple more complicated than it needs to be.

={"Item1","Item2","item3"}

Then refer to it with an index formula,

=INDEX(list_name,ROWS(A$1:A1))
 

Metty

New Member
Joined
Nov 6, 2019
Messages
15
I tried this version, but it didn't work. Whenever I use the name, it's only the first item of the list that appears and when I drag it, it is repeated.


It will depend on how you want to use the names, but you can create arrays by enclosing the data in {}, so for example, you could use:

={1,2,3,4,5}

as the refers to, or for text:

={"Item1","Item2","Item3"}

Note that the quotes go round each item, not around the whole thing.
 

Metty

New Member
Joined
Nov 6, 2019
Messages
15
The problem with INDEX is that, it refers to existing list. I don't want to have lists in my worksheet, I want to have it only inside the name.

It might work if you set the the 'refers to ' range as an array constant, I haven't tried this so no guarantee. It looks like you're trying to make something simple more complicated than it needs to be.

={"Item1","Item2","item3"}

Then refer to it with an index formula,

=INDEX(list_name,ROWS(A$1:A1))
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
34,692
Office Version
365, 2019, 2016, 2010
Platform
Windows, MacOS
Yes, you'll need to wrap it in INDEX as mentioned (that does not require you to use ranges, it works with arrays too).
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
35,883
Office Version
365
Platform
Windows
Have you actually tried what Jason suggested? The list is in the name, not in a sheet.
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
34,692
Office Version
365, 2019, 2016, 2010
Platform
Windows, MacOS
You must have done something different to what he suggested then.
 

Metty

New Member
Joined
Nov 6, 2019
Messages
15
Yes, I have just found the difference between my and his version, and it's ok now.

But as he said, it is now more complicated than it needs to be :)

I needed this function for simplifying my work with the fixed data that I use frequently without having lists in my sheets.

Thank you

You must have done something different to what he suggested then.
 

Watch MrExcel Video

Forum statistics

Threads
1,090,006
Messages
5,411,782
Members
403,398
Latest member
casom

This Week's Hot Topics

Top