+ Reply to Thread
Results 1 to 6 of 6

getting an error when creating a dynamic named range

  1. #1
    Registered User
    Join Date
    03-21-2013
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    10

    getting an error when creating a dynamic named range

    Hello,

    Excel has been messing with me lately. I'm using the OFFSET function to create a dynamic named range. In this case, the range will expand to the height of a column.

    In the Name Manager, here's what I'm entering in the 'Refers to:' box:
    =OFFSET('campaigns'!$A$1,0,0,COUNTA('campaigns'!$A:$A),16)

    What I'm trying to do: select all rows where A has a value (there are no empty rows), and the 16 columns to the right of and including A.

    When I try to enter it, Excel says "The formula you typed contains an error."

    I'm pretty confident that there is no error. In fact, I've successfully declared some named ranges in the same style. Interestingly, when I look at the references that do work, they look like this:
    =OFFSET(reference!$E$2 0 0 COUNTA(reference!$E:$E) [this is copy and pasted]
    =OFFSET(reference!$E$200COUNTA(reference!$E:$E)12)____ [this is how it looks in the 'refers to:' box. the underscores are spaces]

    Is Excel corrupted? Has anyone experienced something like this?

    Thanks for the help.

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: getting an error when creating a dynamic named range

    The formula seems right. Can you upload the example?
    Quang PT

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: getting an error when creating a dynamic named range

    =OFFSET(campaigns!$A$1,0,0,COUNTA(campaigns!$A:$A),16) works just fine for me
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Registered User
    Join Date
    03-21-2013
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: getting an error when creating a dynamic named range

    campaigns_upload.xlsx

    Here it is. I'm trying to enter that same OFFSET line as a named range for this spreadsheet.

  5. #5
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: getting an error when creating a dynamic named range

    I tried and it is OK. I named it "ABC".
    Testing in Q3 with:
    =ROWS(ABC) = 7463.
    See file attached.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    03-21-2013
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: getting an error when creating a dynamic named range

    Thanks for trying it out. I think my Excel is messed up. The ABC reference is weird just like before. I think I'll reinstall Excel...

+ 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