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
1
vote
1 answer

Create a dynamic range, range(cells(), cells())

I need to create a range of cells that will change for different persons names. For each person name I have the row and column numbers that will define the range, and this number are in some cells of the sheet. For instance, rows: Cell(A5) =…
Joaopsm15
  • 21
  • 2
1
vote
2 answers

How to Label A Drawing in Google Sheets to Reference with Google Script

I'm trying to give the title/label "NewGrp" to a drawing I've created in my Google Sheets doc so that I can reference the drawing in Google Apps Script. In Excel, you simply go up to the named range box and name the drawing. In Google Sheets, I can…
1
vote
0 answers

VBA ListBox populating with #N/A instead of named range

I have this code to define the source range for multi-select ListBoxes on my worksheet. Public Function ColourList() As Range Set ColourList = Range("Colours") End Function ColourList is then referenced in another part of the code where the…
aye cee
  • 180
  • 9
1
vote
1 answer

Automatically Create Named Ranges with Dynamic Names

I want to select a range of cells in a column, automatically create a named range with the selected cells which incorporates a number into the name, and then do the same for a column that is 5 columns over. Here is what I have so far but it doesn't…
Dmitriy
  • 37
  • 7
1
vote
0 answers

VBA expand named table range error with variable in Cell function

I am trying to expand a named range table after I have inserted a new column before the first column. If I were to insert a column at the end, it would automatically add it to the table, but when adding it as the first column it does not. I have…
Laucrimus
  • 33
  • 4
1
vote
1 answer

VB.NET - Delete 'Named Range' of Activecell

I'm trying to write a code to using VB.Net to delete the Named Range of the activecell. I can't seem to figure out the correct syntax for this. Can someone please help? Dim xlApp As Excel.Application xlApp = GetObject(,…
Patrick
  • 212
  • 2
  • 11
1
vote
1 answer

Last Row code to the Select case code Ranges

I've added the last row to select case code see below. The error says Method Range of Object _Worksheet Failed Not too sure how to deal with the error? Does it mean it cant find the range on the worksheet? Ive put the color procedure below for you…
1
vote
1 answer

Automating named Range function in google sheets

Context So I have a spreadsheet with 11+ sheets, though will be adding more later. I want to dynamically name the columns using named range. I created a macro script and have been using this. Only the problem is for every sheet, I have to go to the…
Draco D
  • 314
  • 1
  • 6
  • 16
1
vote
1 answer

Using query, Import Range and named range to either label the named range or ignore the header

Context So I am trying to put together some data to run a machine learning model. I need all the data in one google sheet. But I am importing the data from a different spreadsheet saved elsewhere. This is my current…
1
vote
1 answer

How to create Named Ranges using a loop in Excel VBA?

I would like to create named ranges in my Excel sheet which should be copied to another worksheet later. I have created a code that names the ranges like this: Sub Sample1() Dim RangeName As String RangeName1 =…
1
vote
1 answer

Google Sheets Script: Get Sheet a Named Range is On

Is there a way to get the Sheet that a Named Range is on? I list all my NRs on a separate sheet for reference, thanks to a script provided by @cooper, but I haven't found a method to also get the name (or index) for the sheet. function…
maxhugen
  • 1,870
  • 4
  • 22
  • 44
1
vote
2 answers

Google Sheets Script: Get Multi-Col/Row Named Range from Current Cell

From other examples, I have a function that returns the name of a Named Range for the current cell - but only if the range consists of a single cell. I started trying to parse the starting and ending Col and Row of the range, but ran into problems…
maxhugen
  • 1,870
  • 4
  • 22
  • 44
1
vote
1 answer

Google Sheets: VLOOKUP: Named Ranges - Insert/Move Columns

I'm doing performance calculations on an America's Cup AC75 yacht, and have found Named Ranges very helpful in equations I use. On a 'Data' sheet, I now have a lot of information that I'd like to reference as a Named Range, and use via VLOOKUP(), in…
maxhugen
  • 1,870
  • 4
  • 22
  • 44
1
vote
1 answer

Google Sheets: Find All Cells Using a Named Range

I need to find all references to a Named Range (which is a single cell) in any cell in a sheet. Any method (or script) to do this? Context: I'm calculating the lift forces on a boat sail at different wind strengths. The equation uses a "Coefficient…
maxhugen
  • 1,870
  • 4
  • 22
  • 44
1
vote
2 answers

How to avoid @ character in Excel VBA when pasting a formula to a cell

When I try to make equal a cell with a formula containing a named range MyRange, the result will contain an unnecessary @ character. VBA code that I try to apply: Sub InsertFormula() Range("D1") = "=SUM(SUMIFS(A:A,B:B,MyRange))" End Sub The…
Varaszo
  • 13
  • 1
  • 4