Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Using and Displaying a Range in Excel

Posted on 2014-04-12
4
Medium Priority
?
116 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 2000 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

972 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