+ Reply to Thread
Results 1 to 6 of 6

Excel 2007 : Named range keeps changing

  1. #1
    Registered User
    Join Date
    06-10-2011
    Location
    Trondheim
    MS-Off Ver
    Excel 2003
    Posts
    38

    Named range keeps changing

    I don't know much about these named ranges. But I do know that I have to use these in order to get what I want. A dynamic chart.

    But my problem is that the named range keeps changing by itself.

    One of my ranges looks like this:
    Please Login or Register  to view this content.
    I should also perhaps mention that the cells in E2 to E60 also contains formulas.
    This formula basically just copies the value from another spreadsheet, but only if the value in column E in the same row has a value other than nothing or 0.

    Strangely, when I open the spreadsheet, I get the option to Update the workbook.
    And if I do this, I get an error that the formula is wrong.
    And then if I go to check the Named range, it's all changed. Into something I can't even understand. It looks like this right now:

    Please Login or Register  to view this content.
    What is the reason why named ranges changes like this? I want it to always select the range I'm after, not change it at all. Also, I had some help constructing this formula as well, so I don't know why SUMPRODUCT is even there. Basically, this formula is supposed to include the IF(Tall1!E2:E60<>""). So that the range won't include any empty values.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Named range keeps changing

    Named ranges are by nature dynamic and the references in the range formula will change based on the cell selected each time you open the definition window. This is often a useful thing.

    But in your case you want the named range reference to NOT adjust itself that way. To stop this behavior, you must LOCK the reference with $ symbols, the way you locked the A2 reference by making it $A$2.

    =OFFSET(Tall1!$A$2;0;0;SUMPRODUCT(IF(Tall1!$E$2:$E$60<>"";1;0));1)
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    06-10-2011
    Location
    Trondheim
    MS-Off Ver
    Excel 2003
    Posts
    38

    Re: Named range keeps changing

    You don't say! I did not know that! Ok, I'll try it out

  4. #4
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: Named range keeps changing

    In the named range defined as per the formula above, the portion referring to Tall1!E2:E60 will change based on the currently active cell.

    If you want the range to be consistent, you will need to change Tall1!E2:E60 to Tall1!$E$2:$E$60

  5. #5
    Registered User
    Join Date
    06-10-2011
    Location
    Trondheim
    MS-Off Ver
    Excel 2003
    Posts
    38

    Re: Named range keeps changing

    Which worked like a friggin charm!! Thanks!

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Named range keeps changing

    If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1