named range changed when I inserted a row

lezawang

Well-known Member
Joined
Mar 27, 2016
Messages
1,489
Hi

I named A1:A10 as myrange1. Then I inserted a empty row between row 2 and 3. To my surprised now myrange1 is actually A1:A11 ?

Is that by design? if yes, then what is the point of naming range when I can not grante, it will point to the cells I want. Thank you
 

offthelip

Well-known Member
Joined
Dec 23, 2017
Messages
949
It is by design and it is very useful because of it, this is because it allows you to add data to a worksheet and all the equations work without needing to change them all. This behaviour happens whether it is a named range or not. If you have an equation such as :
=Sum(A1:A10)
then if you insert a row e.g. at row 3 you will find the equation has changed to:
=Sum(A1:A11)
 
Last edited:

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
51,147
Office Version
365
Platform
Windows
Using named ranges often makes things like formula easier to work with, especially if you are copying, autofilling, or dragging the formulas, and don't want the range references to change as you do that (I use them mostly when I am doing VLOOKUP and returning multiple columns, so have multiple formulas that I want to copy).

However, just like any other range reference, if you insert or delete a row within that range, the range will automatically grow/shrink to reflect. In most cases, this is what you want to happen.
I cannot think of too many instances where I have a named range, and I adjust the number of rows contained within that range, and not want my named range to reflect that change. Most of the time, it would cause issues for me if that range size did NOT change.
 

Forum statistics

Threads
1,078,226
Messages
5,338,958
Members
399,272
Latest member
jakepenner

Some videos you may like

This Week's Hot Topics

Top