+ Reply to Thread
Results 1 to 5 of 5

Excel 2007 : Fill error when referencing another sheet in same workbook

  1. #1
    Registered User
    Join Date
    04-14-2011
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    5

    Fill error when referencing another sheet in same workbook

    Hello!

    I am trying to resolve an error in a formula when trying to fill the formula to cells beneath it. The formula itself works just fine but when I try to fill it down I get the #REF! error in place of the reference to the other sheet I am referencing. I know I'm missing something small here.

    I have an Excel workbook with only 2 sheets. One is "Data" and the other is "Tracker." I am entering this formula on the Tracker sheet referencing the Data sheet. Here is my formula:

    =COUNTIFS(Data!N2:N1048576, $B4, Data!M2:M1048576, $N$2).

    That formula works fine to do what I need it to do. But when I try to fill it down I get this:

    =COUNTIFS(Data!#REF!, $B6, Data!#REF!, $N$2)

    I want it to always reference the same columns on the Data sheet and the only thing that should change in each filled row is the B column/cell reference, which is working.

    I'm sorry I can't share the actual file because it has sensitive data on it.

    What am I missing?

    Thank you!
    Last edited by Zombie Stomper; 09-23-2011 at 03:42 PM.

  2. #2
    Valued Forum Contributor tlafferty's Avatar
    Join Date
    04-08-2011
    Location
    United States, Tacoma, WA
    MS-Off Ver
    Excel 2010, Excel 2013 Customer Preview
    Posts
    1,112

    Re: Fill error when referencing another sheet in same workbook

    This is because N1048576 is the last row of the spreadsheet. When you fill down, you're asking Excel to reference beyond the limit of it's environment. Make it something smaller such as N65536 which is the limit of the row range previous versions of Excel.
    If your question has been satisfactorily addressed, please consider marking it solved. Click the Thread Tools dropdown and select Mark thread as solved.
    Also, you might want to add to the user's reputation by clicking the star icon in the lower left corner of the post with the answer- it's why we do what we do...

    Thomas Lafferty
    Analyst/Programmer

  3. #3
    Registered User
    Join Date
    04-14-2011
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Fill error when referencing another sheet in same workbook

    Thank you so much tlafferty!! My only issue now is that when I fill it down it is changing the N2:N65536 to N3:65537, N4:65538 etc...
    Last edited by Zombie Stomper; 09-23-2011 at 03:34 PM.

  4. #4
    Valued Forum Contributor tlafferty's Avatar
    Join Date
    04-08-2011
    Location
    United States, Tacoma, WA
    MS-Off Ver
    Excel 2010, Excel 2013 Customer Preview
    Posts
    1,112

    Re: Fill error when referencing another sheet in same workbook

    make it $N$2:$N$65536 (the $ locks the reference in so it won't fill).

  5. #5
    Registered User
    Join Date
    04-14-2011
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Fill error when referencing another sheet in same workbook

    Ahh!! I always miss something so small. I was typing $N2:$N65536. Missing that second $. Resolved. Thanks so much for your help!

+ 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