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

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
35,177
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
10,028
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
35,177
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
42,968
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
35,177
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,102,907
Messages
5,489,640
Members
407,703
Latest member
Chibuzo

This Week's Hot Topics

  • Timer in VBA - Stop, Start, Pause and Reset
    [CODE=vba][/CODE] Option Explicit Dim CmdStop As Boolean Dim Paused As Boolean Dim Start Dim TimerValue As Date Dim pausedTime As Date Sub...
  • how to updates multiple rows in muliselect listbox
    Hello everyone. I need help with below code. code is only chaning 1st row in mulitiselect list box. i know issue with code...
  • Delete Row from Table
    I am trying to delete a row from a table using VBA using a named range to find what I need to delete. My Range is finding the right cell. In the...
  • Assigning to a variable
    I have a for each block where I want to assign the value in column 5 of the found row to the variable Serv. [CODE=vba] For Each ws In...
  • Way to verify information
    Hi All, I don't know what to call this formula, and therefore can't search. I have a spreadsheet with information I want to reference...
  • Active Cell Address – Inactive Sheet
    How to use VBA to get the cell address of the active cell in an inactive worksheet and then place that cell address in a location on the current...
Top