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

Copying cell range with images in Excel files

I'm copying cells from one Excel sheet into another with GemBox.Spreadsheet. The cells are coming from a specific named range and I'm using CellRange.CopyTo method like this: ExcelFile book = ExcelFile.Load("sv-data.xlsx"); ExcelWorksheet sheet1 =…
1
vote
1 answer

How to get range assigned to Named Range in excel vba?

I have already defined the named ranges in my workbook. I want to use the range for placing my pie chart. I am trying to write a code which sets range to variable and move the chart to the specific location. Dim Rng As Range Dim ChtObj As…
1
vote
3 answers

Excel VBA: Dynamic Named Ranges Based on ActiveCell Address

I am attempting to create a dynamic named range that is dependent on the current ActiveCell. The data set has two strokes (Extend/Retract), and each stroke has a unique data sample rate, so the height fluctuates for every stroke and resets at 1…
Cody W.
  • 23
  • 6
1
vote
1 answer

Managing and importing named ranges from another workbook

I was looking at the code available here (https://stackoverflow.com/a/56868436) but clearly I could use some guidance. Public Sub RescopeNamedRangesToWorkbookV2() Dim wb As Workbook Dim ws As Worksheet Dim objNameWs As Name Dim objNameWb As Name Dim…
jsm77
  • 11
  • 3
1
vote
1 answer

Change named range reference to be a combination of two other named ranges

i am currently working on a app that is a combination of java + vba. What i want to do: Some of the data is exported to excel with the help of the apache poi library in the form of a table. I am using this table to define a couple of sub tables that…
NakoNachev
  • 43
  • 10
1
vote
0 answers

Name Manager changing sheets after the data is cleared and re-imported

I am having a problem with the Name Manager (or so I think). I have created two ActiveX Command Buttons, Import Data and Clear Data, respectively. I have also created a set of named ranges using =Offset, which is then used to create a plot of the…
Cody W.
  • 23
  • 6
1
vote
1 answer

How to compare values of corresponding cells in multiple named column ranges and change interior color in another corresponding cell

I want to write a code in Excel VBA that compares the values in corresponding cells in 3 named ranges (say, "Peter", "Paul" & "John"), and if all three values are >= 3, then the interior color of the corresponding cell in a fourth named range say,…
mikeattah
  • 43
  • 5
1
vote
1 answer

Excel VBA Error 1004 on range objects using range names scoped to the Workbook level

Why did this code stop working? I've used Excel range names scoped to the Workbook level in VBA for decades without, in most situations, having to qualify Range() objects with their Sheets() object parent. Recently, this stopped working and now…
Paradox
  • 11
  • 4
1
vote
1 answer

Google App script to rename multiple name ranges according to cell values

I am kinda new in GAS programming and I need help in making a script to rename multiple name ranges according to cell values I am currently using a simple script in which I am creating a name range for a selected column, and naming the range…
1
vote
0 answers

VBA - Conversion of NamedRanges.RefersTo to the formula's actual calculated value

I am building a macro that should: Copy a sheet (by tab name) from a model document into a destination document (achieved!) Replace all references(NamedRange.RefersTo) to other books with the NamedRange value that formula outputs at copy moment.…
1
vote
1 answer

Set Named Ranges as Integers

I'm relatively new to VBA and I'm currently trying to make my life easier by refering to named ranges rather than specific cells (I'm still working on the overall workbook, and I don't want to keep having to change the references every time a cell…
1
vote
1 answer

When does excel use a single item from a named range v.s. all the items?

Say you have the following named-ranges a, b, c, in column A, B, and C: |A |B |C ---+---+---+--------- 1 |a |b |c ---+---+---+--------- 2 |1 |=a |=b+a ---+---+---+--------- 3 |2 |=a |=b+a ---+---+---+--------- 4 |3 |=a…
Simon Streicher
  • 2,638
  • 1
  • 26
  • 30
1
vote
3 answers

How to reference named range in VBA from an inactive sheet?

I see this question asked and answered but I'm missing something! In order to use Named Ranges in my VBA I must activate the sheet before using the Named Range, otherwise it accesses the "same" range in the active sheet. I have: made sure that…
Neal Davis
  • 2,010
  • 2
  • 12
  • 25
1
vote
1 answer

Combine named range with other options in one data validation list

I have a named range in Excel that contains user-entered manufacturers of cars. I want to use this named range in another table as a data validation dropdown list, but also include two other options: blank and "Manufacturer not in list". Is there…
John
  • 802
  • 2
  • 9
  • 19
1
vote
2 answers

Excel Named range using *? in order to count only relevant cells

Would like to use named range in order to find all relevant values in a range. However after several differrent approaches it seems that I cant't progress from here. Using *? in countif formula in order to get all text or values in the range,…
Martinswe
  • 43
  • 6