Dynamic named range formula

Posted on 2013-06-04
Last Modified: 2013-06-04

I always have data alike this



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!
Question by:Shanan212
LVL 23

Accepted Solution

NBVC earned 500 total points
ID: 39220347
Try something like:


assuming the sheetname is Sheet1
LVL 13

Author Closing Comment

ID: 39220361

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


Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone 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

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
No matter the version of Windows you are using, you may have some problems with Windows Search running too slow or possibly not running at all. Before jumping into how you can solve this issue, just know there are many other viable alternative deskt…
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…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

828 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