+ Reply to Thread
Results 1 to 8 of 8

#SPILL error using named ranges in dynamic formulae

  1. #1
    Registered User
    Join Date
    06-03-2021
    Location
    England
    MS-Off Ver
    MS365
    Posts
    4

    #SPILL error using named ranges in dynamic formulae

    Hi, I am using name ranges.
    When projecting numbers I would like to take the previous year number and multiplying them to the respective name range.
    However, upon autofill, it does not let me change the cell reference of the year number, so it is just being calculated from one specific year, and not changing to the previous year with each calculation.
    ie. I would like to reference the previous column.

    Please can someone help me?

    G11 is: =F11*(1+RevGrowth), which is correct
    H11 should be: =G11*(1+RevGrowth) but shows =F11*(1+RevGrowth)
    I11 should be: =H11*(1+RevGrowth) but shows =F11*(1+RevGrowth)
    Likewise,
    G12 is: =G11*COGSMargin, which is correct
    H12 should be: H11*COGSMargin but shows G11*COGSMargin
    I12 should be: I11*COGSMargin but shows G11*COGSMargin

    I try editing H11, I11, H12 and I12 however the inputs are greyed out. When editing, I get a #SPILL error.

    Please can anyone help?
    Attached Files Attached Files
    Last edited by goku1230; 06-04-2021 at 05:41 AM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2505
    Posts
    27,223

    Re: Named range

    Please review the description you gave us while looking at your file. I assume you are looking at the sheet "Answer 4.1". The formulas on that sheet look correct to me. The formulas in G11:I11 each take the prior year's actuals or projection, and project growth of RevGrowth percent.

    G11 is: =F11*(1+RevGrowth) so far, so good

    H11 should be: =F12*(1+RevGrowth) but shows =F11*(1+RevGrowth) actually it shows =G11*(1+@RevGrowth2). Why do you think it should be anything different?

    J11 should be: =F13*(1+RevGrowth) but shows =F11*(1+RevGrowth) There is nothing in J11. However, I11 shows =H11*(1+@RevGrowth2). Why do you think it should be anything different?

    In your description of what "should be" you are talking about referencing the next row, but that is wrong. You want to reference the previous column, which is what the formulas do.

    When you copy or fill cells, relative references to cell keep the same relative distance. That is, if you have a formula in G11 that refers to F11, it is referring to the cell one column to the left in the same row. If you copy that formula to H11, it will refer to G11, one column to the left in the same row.
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    06-03-2021
    Location
    England
    MS-Off Ver
    MS365
    Posts
    4

    Re: Named range

    Apologies - I meant to write that the worksheet on Question 4.1.

    Yes, I would like to reference the previous column,


    G11 is correct,
    however H11 and I11 do not reference the previous column.
    When I try to change H11, I11 etc. to reference the previous column, I get a #SPILL error.

    Please could you advise on how to fix this?
    Attached Files Attached Files
    Last edited by goku1230; 06-04-2021 at 05:31 AM.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,880

    Re: Using named ranges in dynamic formulae

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however the thread title does not really convey what your request is about. Tell us what you are trying to do, not how you think it should be done.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. As you are new here, I have done it for you today.)

    Please update your forum profile: your Excel version is MS365 (not the release number thereof). Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  5. #5
    Registered User
    Join Date
    06-03-2021
    Location
    England
    MS-Off Ver
    MS365
    Posts
    4

    Re: Using named ranges in dynamic formulae

    Many thanks - I have amended the title and my excel version.

    I have also made my query more clear, so help on the issue would be much appreciated!

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2505
    Posts
    27,223

    Re: #SPILL error using named ranges in dynamic formulae

    The file you attached in post #3 has nothing in G11. It looks like you edited post #1 and uploaded a different file there, so let's go with that.

    RevGrowth is an array. When you multiply by an array, you get an array as a result. In this case, each formula generates an array with three values that will go into that cell and the next two cells. So each cell's result overlaps the next cell's results, hence the SPILL error.

    To return a single corresponding value from the array instead of the whole array, use a @ in front of the range name:

    Values as displayed
    G
    H
    I
    9
    Projections
    10
    31-Dec 17
    31-Dec 18
    31-Dec 19
    11
    5,400.0
    6,588.0
    8,169.1
    Underlying formulas
    G
    H
    I
    9
    Projections
    10
    =EOMONTH(F10,12)
    =EOMONTH(G10,12)
    =EOMONTH(H10,12)
    11
    =F11*(1+@RevGrowth)
    =G11*(1+@RevGrowth)
    =H11*(1+@RevGrowth)

  7. #7
    Registered User
    Join Date
    06-03-2021
    Location
    England
    MS-Off Ver
    MS365
    Posts
    4

    Re: #SPILL error using named ranges in dynamic formulae

    Thanks so much! Really appreciate the help - rep well deserved

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,880

    Re: #SPILL error using named ranges in dynamic formulae

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 3
    Last Post: 02-09-2021, 03:12 AM
  2. Listbox displaying named range B but Adding named range A to cell
    By ikkenieikke in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-05-2018, 02:27 PM
  3. [SOLVED] Compare cells to named range and create new sheets using related named range
    By drewship in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-10-2015, 03:35 PM
  4. [SOLVED] determining if cell is part of named range and what that named range is
    By stnkynts in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-16-2014, 07:56 PM
  5. Adding row to a named range-updating the named range address
    By kjsconv in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-12-2013, 11:22 PM
  6. Replies: 1
    Last Post: 02-27-2013, 12:00 AM
  7. [SOLVED] Determine what Named Range the Target Address is and return Named Range Name
    By jordan2322 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-18-2012, 10:49 PM

Tags for this Thread

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