Share via

Error when refreshing Pivot Table and using OFFSET function: "Reference is not valid error message."

Anonymous
2011-12-06T09:08:08+00:00

Original Title:"problem with named range in excel mac"

I have a named range in Excel Mac which I am using for Pivot tables.

When I try to refresh the pivot table or create a new table using this named range I am getting a "Reference is not valid error message."

I can create a pivot table using the same range of data without the named range, but am totally stumped by the reference not valid error message.

the named range is defined by the formula

=OFFSET(A1,0,0,COUNTA(A:A),17)

I am using the COUNTA(A:A) to make the database dynamic as column A requires input)

If I simply highlight the cells for the range and create a new pivot table it works fine, but as soon as I name the range I am getting a reference is not valid error message. This seems to happen even with a simple named range like =A1:Q10

Can anyone explain this to me?

Microsoft 365 and Office | Excel | For home | MacOS

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2011-12-07T13:53:00+00:00

Looks like a bug. And, for the record, upper or lower case makes no difference.

Was this answer helpful?

0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Anonymous
    2011-12-07T13:33:12+00:00

    I have tried both of these:

    =offset(Sheet1!$a$1,0,0,counta(Sheet1!$a:$a),17)

    and

     =OFFSET(Sheet1!$A$1,,,COUNTA(Sheet1!$A:$A),17)

    As soon as I use the named range I get the "Reference is not valid" error message.

    If i just use the range in the pivot table it works with no problems

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2011-12-06T15:57:14+00:00

    Does the named range refer to the specific sheet your data is on, e.g.:

    =OFFSET(Sheet1!$A$1,,,COUNTA(Sheet1!$A:$A),17)

    or is it relative?

    Is it a workbook-level name rather than a worksheet-level name?

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2011-12-06T14:41:46+00:00

    I had tried this, for some reason I still get an error, even if I make it an absolute range of =$A$1:$Q$10 instead of the dynamic range.

    This is the strangest problem I have come across as the pivot table works perfectly fine without the named range.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2011-12-06T12:56:48+00:00

    Try making you references absolute, rather than relative:

    =offset($a$1,0,0,counta($a:$a),17)

    and see if this makes a difference.

    Was this answer helpful?

    0 comments No comments