Solved

Dynamic named range formula

Posted on 2013-06-04
2
287 Views
Last Modified: 2013-06-04
Hi,

I always have data alike this

HEADING
DATAA
DATAB
DATAC
DATAD
DATAE

0

Open in new window


So I always have data ending with a zero 1 row below the last data. It could be 100s of lines.

Eg: I could have data from

A2 to A982

and then have a zero (0) in line A984

What I want to do is create a dynamic named range that will grab just the data part and omit the zero and the space above it based on formula only (currently I am doing it via VBA and want to eliminate vba)

Thank you in advance!
0
Comment
Question by:Shanan212
2 Comments
 
LVL 23

Accepted Solution

by:
NBVC earned 500 total points
Comment Utility
Try something like:

=Sheet1!$A$2:INDEX(Sheet1!$A:$A,MATCH(0,Sheet1!$A:$A,0)-2)

assuming the sheetname is Sheet1
0
 
LVL 13

Author Closing Comment

by:Shanan212
Comment Utility
=Sheet1!$A$2:INDEX(Sheet1!$A:$A,MATCH(0,Sheet1!$A:$A,0)-1)

^ That worked; instead of -2, I changed it to -1

Thanks!
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This article will show you how to use shortcut menus in the Access run-time environment.
Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now