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
2
votes
3 answers

VBA - select a named range by referring to another cell with the name in it

I have 150 named ranges that I am trying to perform a loop function on. I have the names of the 150 ranges listed in my worksheet. How do I reference the content of the name when I am trying to select the named range using my VBA code? For…
2
votes
1 answer

Is there a way to change the scope of a named range from workbook to worksheet using Python?

I created a named ranges on my Excel sheet using the function define_name() with pd.ExcelWriter(excel_broker, engine='xlsxwriter') as writer: # Get xlsxwriter objects workbook = writer.book header =…
Rania
  • 23
  • 2
2
votes
1 answer

Obtaining the 'Name' of a Specific Cell as Defined by Excel's Name Manager

I am creating a class module that I would like to be used with minimal setup/preparation as I expect it to be used within multiple projects. One of the requirements is that the class module should first check for a special worksheet that is to be…
K.Dᴀᴠɪs
  • 9,945
  • 11
  • 33
  • 43
2
votes
2 answers

For loop to uniquely name each non empty cell in a range

The code below names the last cell in the range as opposed to each cell in the range. I am trying to run this loop so that starting from cell A1, any non empty cells are named "Guidance1", "Guidance2", and so on. Sub GiveAllCellsNames() Dim wb…
2
votes
2 answers

Name a Cell Range After Checking it Doesn't Have a Range Name

I'm trying to cycle through a selection of cells and rename those cells based on text values on the spreadsheet. Sub naming() Dim cel As Range Dim selectedRange As Range Dim to_offset As Integer Set selectedRange =…
2
votes
1 answer

Google Apps Script - Loop to Update Multiple Named Ranges Based on Reference Table

First off, I realize that there are ways to do this without using named ranges and scripts. Sadly, Google Docs imported ranges strongly disagrees so I need to find a way to make this work. I think I'm nearly there with this script, but I lack the…
2
votes
1 answer

How to hide/unhide a named range of columns with Google script

Anyone who can help me with a script that allows me to hide or show columns that have already been named manually. The code below only hides/displays specific columns and my problem is that the user can insert/delete columns within a named range and…
Squirrel22
  • 23
  • 3
2
votes
1 answer

How to reference the Nth column in a named range in Excel for plotting?

I have a table with, say, 3 rows and 3 columns, the first one being the date and the other two being random data such as below (data start in A1): I have created the first named range as 'Date' for A2:A4 and the second named rage as 'Data' for…
user89073
  • 317
  • 1
  • 3
  • 11
2
votes
1 answer

Find Range of Excel Array Formula

A certain cell is part of a range containing an array formula (created using CTRL-SHIFT-ENTER). Other than my brute force method of visually examining the formula in the certain cell, does Excel have a command that will highlight the range of cells…
farmerandy
  • 139
  • 9
2
votes
1 answer

Retrieve text in namedRange with Google Docs API

Using the Google Docs/Drive APIs with Node, I've successfully made a service which produces 'template' style documents which feature namedRanges for other users to write into. I'd like to use the Google Docs API to read the text that gets entered…
2
votes
1 answer

Reference named ranges in external workbook with formula criteria

Need Help on Named Ranges in Formulas: I have a second workbook ('TEST.xlsx') as the destination, referencing worksheet-scoped named ranges (in 12 columns X 75 rows) in the source workbook ('FLOW.xlsx'). I want to create a formula that will match a…
johnp_c
  • 21
  • 3
2
votes
2 answers

How to Reference a Named Column in a Range of Rows in Excel VBA

I want to loop through all the cells in in a named column of a set of rows selected by the user. However, I am not sure how to accomplish this. Named Column in Selection of Rows I have used the blow code to get the user selected range / rows, but I…
norsemanGrey
  • 345
  • 4
  • 10
2
votes
1 answer

How to select a named range in Google Sheets' query?

I'm trying to set up a query using named ranges, is it possible to select a named range within a query? I've tried the following: =QUERY(NamedRange, "select '"&NamedRange2&"' where '"&NamedRange3&"' contains '"&B2&"' ") I want to be able to use…
2
votes
1 answer

How do I automatically update all conditional formatting / named ranges when I change my sheet name?

Please see calendar example here. I have created multiple conditional formatting so calendar updates with proper colors for each date depending on what section it falls under. My issue is - how do I make sure that conditional formatting updates when…
2
votes
3 answers

Is there an easier way to implement the missing "getNamedRange(....)" method?

In Google Apps Script there is a method getNamedRanges() on Spreadsheets and Sheets which returns a LIST of Named Ranges. But there is no getNamedRange("Name") which returns a SINGLE named range. This seems odd to me. To get round this, I'm using…