Questions tagged [named-ranges]

A fixed or dynamically defined range of cells that has been assigned a name by a user. Named ranges are used in Microsoft Excel and similar spreadsheet applications. Named ranges may be referred to in formulas or in code and are useful for convenient reference and improved formula readability.

When to Apply Tag:

Questions that specifically concern the creation, definition, or application of named ranges in a spreadsheet application should be applied . This tag should be applied in addition to the tag for the specific spreadsheet application being used, such as .

About Named Ranges:

In Microsoft Excel, named ranges may be defined in several ways. The Name Box, located to the left of the formula bar, may be used to apply a name to the selected range. The Name Manager (accessible on the Formulas ribbon or by pressing Ctrl+F3) may be used to define a named range as well.

Names defined in the Name Manager may be defined statically, i.e., as an address, such as

=Sheet1!A1:C3

Or dynamically, i.e., as a formula, such as

=INDIRECT("Sheet1!A1:A"&COUNTA(Sheet1!A:A))

Dynamically defined named ranges are useful for referring to ranges that may have changing dimensions or location, such as a column in a table where rows and columns are sometimes added or removed.

Named ranges may be used in formulas. For example, where the range A1:A5 is named MyNamedRange, the following formulas are the same:

=SUM(A1:A5)

and

=SUM(MyNamedRange)

Name ranges may also be used in VBA application.

Dim rng as Range
'MyNamedRange is previously defined named range.
Set rng = Range("MyNamedRange")
'Alternative way of defining range object using named range
Set rng = [MyNamedRange]

For more information on named ranges:

73 questions
12
votes
1 answer

Shortest Method To Reference A Single Row/Column of a Named Range in Excel?

I have a named range (NamedRange1) and I need to reference the first row and first column of that range within a formula. I came up with the following: First row: INDIRECT("R" & ROW(UnpivotSource) & "C" & COLUMN(UnpivotSource) & ":R"&…
8
votes
1 answer

Excel telling me my name already exists when renaming a table

I have copied a table from an external workbook into a different workbook. When I rename the table (on the design tab), Excel tells me that the name already exists. When I rename a range within excel to the same name, this works fine. The name…
8
votes
2 answers

What's the difference between a Table and a Named Range in Excel 2007?

Can someone explain the difference between Excel Tables and Named Ranges in Excel 2007? It seems that in addition to having the features of Named Ranges, they're somehow marked as Tables which gives them special formatting & filtering options in the…
6
votes
2 answers

Excel reference named range with text and formula

Is it possible to refer to a named range by combining text with a formula? Say I get a name for a range via INDEX which returns a text but I also want to add something after the text like so: RANGE & "Whatever comes after" I have several named…
5
votes
5 answers

How do I prevent VLOOKUP from breaking after I add a column to a named range?

My Excel worksheet contains a lot of VLOOKUPs on a named range that I have defined. Now, when I added a column in the middle of my named range, the VLOOKUPs that reference columns after the inserted column are now broken. I understand the problem,…
bsh152s
  • 191
4
votes
1 answer

Excel 2010: Create named range without a sheet reference in the formula

In Name Manager I created a named range with this reference: =COUNTIF($A$4:A4, Tbl_InventoryMain[Barcode]) Excel automatically inserts the current sheet name prior to the $A$4:A4. I need this to just stay $A$4:A4 in order to use this same…
3
votes
4 answers

Apply Names in Excel is bugged?

I see people had this problem back in 2005 and it's still not fixed. In my sheet I have these named ranges: A1 - "name1" B1 - "name2" C1 - "name3" In some other 3 cells I have these formulas: =A1 =A1+B1 =COUNT(A1:C1) After running Apply Names... I…
3
votes
2 answers

Referencing cell only by column name in Excel 2010 VBA

In Excel 2010, I need to go through a data table row by row and manipulate the data in VBA. My original function reads like this: Private Function GetValue(ByVal myRange As Excel.Range, ByVal strCol As String) As String Dim myCell As Object …
chabzjo
  • 189
  • 1
  • 1
  • 5
3
votes
3 answers

Creating a chart using a dynamic named range in Excel 2010

I am trying to create a scatter plot in Excel 2010 using dynamic named ranges and am having trouble getting it to work. Here's simple example that is failing: Open Excel, starting a new workbook Enter some data: In cell D1, enter: $A$1:$B$5. (In…
3
votes
2 answers

Excel Name.RefersToRange: how to check if Name object refers to a range?

The Microsoft documentation says about RefersToRange: If the Name object doesn't refer to a range (for example, if it refers to a constant or a formula), this property fails. I'm trying to iterate over all the named ranges in a…
User
  • 3,835
3
votes
1 answer

Single named range over multiple sheets in same Excel file?

In Excel, is it possible to name a range that exists over multiple tabs? For example, I have a range B3:C20 in sheets Tab 1 and Tab 2 I tried to name a range NamedRange1 that referred to ='Tab1'!$B$3:$C$20,'Tab2'!$B$3:$C$20 which seemed to work…
2
votes
1 answer

Build a lookup query in Excel using named ranges stored in a cell

I have a spreadsheet which has a lot of named ranges, each of which is a table. I want to be able to run a lookup that will retrieve a value from any of the tables. I want to be able to store the name of the named range in a cell. I…
2
votes
1 answer

Can the name of a named range be dynamic?

I'd like the name of a named range in excel to be dynamic (as opposed to the range itself!). I'd like to know if/how I can define a range name using a formula or reference cell, so that the name changes when the content of the reference cell is…
2
votes
2 answers

Mac Excel 2011: find Items in one column that are not in another column

Hi this is a repeat of the question: Find Items in one column that are not in another column I have two columns in excel, and I want to find (preferably highlight) the items that are in column B, but not in column A. What's the quickest way to do…
2
votes
1 answer

How do I do a simple select on tabular 2D array?

How do I do a simple select on tabular 2D array? Let's say, I have a named range called "Testy", and that is all the information I have. I know the Columns (dimensions) of the data are in row 0 (or 1, not sure how excel counts rows). I know the…
1
2 3 4 5