Solved

Using and Displaying a Range in Excel

Posted on 2014-04-12
4
111 Views
Last Modified: 2014-04-20
EE Pros,

I have defined a Range name on a WS.  I want to display it on another worksheet. How do I display a range name that is on a different WS (formula?).  Additionally,  When I change (add, insert or delete) a row in the original WS with the original Range Name defined, will it be reflected in the other WS?

Thank you in advance,

B.
0
Comment
Question by:Bright01
  • 2
  • 2
4 Comments
 
LVL 17

Expert Comment

by:andrewssd3
ID: 39995792
Named ranges in Excel can be defined with workbook scope, which means they can be referenced from anywhere in the workbook, or with worksheet scope, which means they are local to a sheet (so different sheets can have the same named range).

Your named range seems to contain multiple rows and columns; you can refer to a range like this from another sheet by using an array formula, but you do need to know the exact number of rows and columns - basically you select the number of rows and columns you want, and enter =MyRange then confirm as an array formula using ctrl-shift-enter.

If the named range is workbook-scoped you don't need any other qualification.  If it's local to a sheet, you can refer to it from another sheet, but you need to prefix it with the worksheet name and a ! - e.g. =SourceSheet!MyRange.

In answer to your other question, the data will update automatically, but if you add rows, you will need to extend the array formula manually, and if you delete rows, you will get a row of #N/A errors in your array formula range. I don't know of a way around this without using VBA code.

I have done an example on the attached sheet using a global and a local range for you to experiment with.
range-example.xlsx
0
 

Author Comment

by:Bright01
ID: 39995881
Andrewss3,

Great insight.  OK, I defined my range name on the source WS and used Cont.+Alt.+Enter to define it as an array.  Now when I go to the Target WS, I use the formula {=Rangename} and nothing happens.  It is a Wookbook Name so it's global.  How do I get it on the next WS?

Thank you,

b.
0
 
LVL 17

Accepted Solution

by:
andrewssd3 earned 500 total points
ID: 39995897
You're nearly right - you define the range as normal.  It's when you enter the range on the target ws that you need an array formula.  So:
define your range
go to the target sheet and select the desired number of rows and columns
enter your formula =Rangename - note NO curly braces
now confirm with Control-Shift-Enter  (not Alt) - Excel makes this array formula apply to all the cells and puts in the curly braces
It's a little bit fiddly working with arrays, but it's very powerful once you get the hang of it.

It's worth noting that you cannot change part of an array - Excel will give you an error message, so to change or delete it you need to select the whole range that the array formula applies to.  The shortcut Ctrl-/ is useful for this. If you select one cell in a range that is part of an array, then press Ctrl-/ it will extend the selection to the entire range.
0
 

Author Closing Comment

by:Bright01
ID: 40011928
It works!  Thank you........ appreciate the tip on building Arrays using Range Names.

B.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question