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
0
votes
1 answer

Import values from named ranges from different workbooks

I have the following code that aims to import ranges from a different workbook into the current one. They share the same named range names but it might be that they are in different worksheets. My code for the sub looks like this: Sub…
Spurious
  • 1,903
  • 5
  • 27
  • 53
0
votes
2 answers

Update specific value in named range?

I have the following function which retrieves a value from a named range: Function getSetting(settingName As String) getSetting = Application.VLookup(settingName, Range("rSettings"), 2, True) End Function Now I can easily say myColor =…
user736893
0
votes
1 answer

Automatically substitute range names in google sheets

I love the idea of named ranges for making formulas less obscure. However I have yet to find an easy way to actually use them. E.g. when entering a sum, I normally do =sum( then mouse to the blob of stuff I want then type ) If I want to use a…
Sherwood Botsford
  • 1,889
  • 5
  • 20
  • 35
0
votes
1 answer

Add more than two ranges of data on an Excel chart with powershell

I read a thread here about adding more than one series at an Excel chart that helped me a lot, but I also need to add 3 ranges of information to a same line (series) on a chart. My objective is getting information from another Excel file, move it to…
0
votes
2 answers

Finding a VBAS defnied Named Range definition

a valueI've inherited a large VBA project and whilst I have lots of dev expereince I have a small amount of VBA. The code reads data off a sheet in the form: Intersect(Range("colName"), .Rows(intCurrentRow)).Value Where colName is a named range, or…
SteveB
  • 1,474
  • 1
  • 13
  • 21
0
votes
5 answers

Simpler/cleaner way to specify ranges when using lots of named cells in VBA?

In a fairly large Excel program I'm working on, I have a lot of named cells in the spreadsheets that get filled with data in order to help keep formatting consistent if the user ever decides to move the template setup around, and to avoid hardcoding…
FredGooch
  • 191
  • 2
  • 13
0
votes
2 answers

What does Resharper have against the commonly-used getRange() in Excel Interop?

Almost all of the example code online for C# Excel interop has stuff like this: monthlyChartRange = _xlSheetChart.get_Range("A3", "C4"); Yet, Resharper turns up its nose at it and demands: "Use indexed property" If you accede to its wishes (and I…
0
votes
1 answer

How can I efficiently add right borders to an Excel range with C#?

Is there a concise (one-line) way to programatically add right borders to a range of cells on an Excel spreadsheet using C#? This code works: private void AddRightBorderToMainRange() { for (int i = COLUMN_HEADING_ROW; i < _lastRowAdded; i++) …
B. Clay Shannon-B. Crow Raven
  • 8,547
  • 144
  • 472
  • 862
0
votes
1 answer

VBA: Filtering a list and storing result as named ranges

I have the following list: I want to make a VBA code filtering the different names on which store they work in, and storing the result in a named range with the name of the store - and the range being the names from the list working in that…
Helen
  • 533
  • 12
  • 37
0
votes
1 answer

Dynamic Named range formula not working on another sheet.

I am using this formula in a named range that will dynamically get the row that matches the text in the first column and what the LastColumn is as indicated on another sheet. When I am in the edit named range box as you can see in the pic, it is…
djblois
  • 963
  • 1
  • 17
  • 52
0
votes
1 answer

Get data from external book with named range to a named range

Good morning all, I have rather limited vba experience but can generally adjust 'googled' code to fit most of my basic needs. However, I am currently having an issue with the below code. The intention is to grab data from a table in one sheet and…
0
votes
2 answers

Is the MATCH worksheet function allowed in a named range for Excel charts?

The following two named range definitions are valid (verified by Excel), and both highlight the same range of cells. =OFFSET('AU_ARENDOFDAY Times'!$C$1, COUNT('AU_ARENDOFDAY Times'!$C$2:$C$10000) - 29, 0, 30, 1) and…
T6J2E5
  • 171
  • 3
  • 15
0
votes
1 answer

Use formula to dynamically modify named range

I am using a bunch of named ranges in a workbook. Here is the history of how it has changed to make it more dynamic for when they ask me to modify it. What I want to do is search the A column from 1 to 100 for the label in the A column (that I code…
djblois
  • 963
  • 1
  • 17
  • 52
0
votes
1 answer

Offset formula used in dynamic range for chart generating invalid reference error

I have a simple bar chart in Excel 2010 that uses two columns, one for the value labels and one for the data. Depending on the country the data is for the number of bars ranges from 10-15. I'm using the offset formula to create a dynamic named…
S Jacobs
  • 11
  • 2
0
votes
1 answer

SUMIFS using a date range plus two sales code criteria will not work

I searched for similar problems and found some, but I can't seem to get this to work. I have =SUM(SUMIFS(TotalAmount, Date, "<="&A274, OfferCode, {"REN- xyz -cc","REN- xyz -plg"}, UpgradeCode, {"upgrade - cc","upgrade -plg"})) Where:…
user5149495