98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel Training and help » Naming data ranges
Naming data ranges
Resolved · Low Priority · Version 2003
Melanie has attended:
Excel Advanced course
Excel VBA Intro Intermediate course
Naming data ranges
Hello,
I am familiar with naming ranges and using these to input into functions, however, if more data is subsequently entered to a worksheet I get frustrated by having to re-set all the ranges again.
Is there something I can do to prevent this from happening in the future?
Many thanks,
Melanie
RE: Naming data ranges
Hi Melanie
Thank you for your question.
If your range spans several rows (for example from rows A1 to A7) and a new item is added in row A8 we can make the range automatically include the new row in the range.
Highlight the values in the column to be included in the range and use Insert > Name > Define and fill in the name box to describe your range e.g. My_Range. Before you click OK in the Refers to section put the following:
=OFFSET(Sheet1!$A$1,0,0,COUNTA(Sheet1!$A:$A),1)
This uses OFFSET and COUNTA functions.
Click OK to complete naming the range.
Now we'll test it. Back in your sheet in a new cell set up a simple function to count how many items there are in your range.
=count(My_Range)
The result in this in this case would be 7
Now add a new item on the next row belowthe values in column A. When you press enter the count should increase by 1 as the new row is included in the range.
I hope this helps - do let us know if you have any further questions.
Kind regards,
Andrew
Tue 9 Feb 2010: Automatically marked as resolved.
Training information:
See also:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Recently used file listUnder the File menu, you may find a list of files at the bottom of the menu. These files represent the most recently used Excel spreadsheets. This file list provides a quick way for you to access your files. |