Questions tagged [named-ranges]

A named range is a defined area, typically in a spreadsheet or document, used for future reference. A range can be one cell in a spreadsheet, or a range of cells.

Named ranges (or defined names) in spreadsheets are used to refer to one or several contiguous cells.

Ranges will automatically shift the while the layout of the Worksheet changes (adding or deleting rows or columns). Furthermore, named ranges can be defined with formulas.

609 questions
54
votes
6 answers

How do I reference a cell within excel named range?

For example, I have a named range A10—A20 as Age; how do I get Age[5] which is same as A14. I can write "=A14" but I did like to write "=Age$5" or something similar.
Champ
  • 1,291
  • 4
  • 16
  • 32
21
votes
1 answer

How do you get a Range to return its Name?

Dim sampleRange as Range Set sampleRange = Worksheet.Range(Cells(1,1),Cells(1,4) sampleRange.Name = "Range1" MsgBox sampleRange.Name The above code will show the actual address of the range, not the name. Why? How do I get a named range to return…
GenericJam
  • 2,915
  • 5
  • 31
  • 33
21
votes
1 answer

getRange with named range google spreadsheet using scripts

Can the getRange be used to have a named range instead of an area? When I seem to do it, it says the argument must be a range. For example, Instead of: getRange("A4:E7"); The area of A4:E7 has been made into a named range called 'Names' in…
user1658604
  • 213
  • 1
  • 2
  • 6
17
votes
6 answers

Google Spreadsheet range names

In Google Docs Spreadsheets, one can use Range Names to put labels on ranges of cells to make formulas more legible. In most formulas, one can use the range C:C to denote the entire C column, and C2:C to denote the entire C column after and…
Daniel Gill
  • 3,261
  • 2
  • 23
  • 21
15
votes
2 answers

Using named cells in a VBA function

I have a worksheet where I have defined names for certain cells. These cells will be used in the function and I am calling them using their names. However, I get 0 as a return of the function when I call it with Excel, as if the names were not…
user2453446
  • 293
  • 3
  • 5
  • 14
14
votes
2 answers

Excel VBA: Workbook-scoped, worksheet dependent named formula/named range (result changes depending on the active worksheet)

EDIT: Title changed for clarity. Quick summary: I want to know if the behavior of workbook-scoped, worksheet dependent named formulas (which I will describe below) is a documented feature in Excel. If so, please point me in the direction of some…
Rick
  • 43,029
  • 15
  • 76
  • 119
12
votes
1 answer

How do I name a range in google docs?

The Google Apps Script API for Docs has a number of methods defined that work with Named Ranges in Docs. While I am familiar with Named Ranges in Sheets, I cannot find a way to name a range in Docs. Does anyone know how to name a range using the…
Jon Pellant
  • 388
  • 3
  • 13
11
votes
4 answers

Is it possible to assign conditional formatting to a named range in Google Sheets?

I'd like to apply a conditional formatting rule to a named range. Is that even possible? How do I do that? When trying to enter the Name of the Range to the Field where you set up the range the rule applies to it won't accept my input. Also with…
10
votes
8 answers

Referencing Dynamic Named Range in Excel Formula

I have a table in Excel with column headings that correspond to part of a dynamic named range elsewhere in my workbook. For example, I have these column headings: "10", "20", etc., and these dynamic named ranges: "ExampleRange10", "ExampleRange2",…
Kyle Wurtz
  • 171
  • 1
  • 1
  • 8
8
votes
3 answers

Get sheet name from a named range's Name object

I have: Microsoft.Office.Interop.Excel.Workbook wb; Microsoft.Office.Interop.Excel.Name name; Is there any way to get the worksheet name that the named range is on in the given workbook, assuming I've gotten the named range's Name object and wb…
Shark
  • 2,322
  • 5
  • 31
  • 44
8
votes
1 answer

excel named range copy from sheet to sheet

I have an Excel question, I am wondering if there is an easy way to set up a clone or copy of a named range in one worksheet to another worksheet in the same workbook. I need this to be done automatically as the data comes in through a third party…
rekordboy
  • 146
  • 1
  • 1
  • 5
7
votes
1 answer

How to OFFSET from a dynamic named range and use that range in SUMPRODUCT?

Situation: I am getting #Value! when trying to pass the OFFSET of a dynamic named range to SUMPRODUCT. Setup: I have the following data in range A2:B4 of Sheet1. | TextA | 1 | |-------|---| | TextA | 2 | |-------|---| | TextB | 3 | I have created…
QHarr
  • 83,427
  • 12
  • 54
  • 101
7
votes
1 answer

Get a Named Range by String in Excel Workbook when Name is duplicated

To elaborate, let's say I have two named ranges in my workbook. Both named ranges have the same Name (let's say "myName"), but one is scoped to Sheet1 and the other is scoped to the Workbook. Given a name (string) of the Named Range, I want to grab…
Shark
  • 2,322
  • 5
  • 31
  • 44
6
votes
2 answers

How to use variable range in Google Sheets?

Currently I have such formula: COUNTIFS(B3:B36,"16",E3:E36,"01") Would it be possible to turn these ranges B3:B36 and E3:E36 into variables, like B'start_cell_value':B'stop_cell_value'. The whole thing would look like: …
6
votes
4 answers

Find where named ranges are being used in big workbook

I have a list of 594 named ranges in a workbook with nearly 20 sheets, each sheet has about 200 columns of data. I need to find out where the named ranges are being used so as to remove irrelevant ones. I pasted a list of named ranges onto the sheet…
charliealpha
  • 307
  • 2
  • 12
1
2 3
40 41