+ Reply to Thread
Results 1 to 5 of 5

OFFSET COUNTA Named ranges in a table

  1. #1
    Registered User
    Join Date
    06-18-2013
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    23

    OFFSET COUNTA Named ranges in a table

    Dear all,

    I'd like to produce a dynamic named range called "Margin" (highlighted in green in the enclosed file) that will change as more columns are added to a table.

    The named range would be used in a "Top 10" table calculation, using the AGGREGATE function. The formula finds highest to lowest margin values and ranks them.

    I have tried to use the formula OFFSET(C11,0,0,1,COUNTA(11:11)) in the name manager, but I get odd results.

    Is there another way to define the named range along row 11 as I add more jobs to the table?

    I enclosed an example file.COUNTA and OFFSET.xlsx

    Thanks

  2. #2
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: OFFSET COUNTA Named ranges in a table

    Why do you get odd results? I use Offset(CountA()) all the time for dynamic named ranged and have only had ONE issue with them, where you cant use indirect formulas with dynamic named ranges.
    Please ensure you mark your thread as Solved once it is. Click here to see how.
    If a post helps, please don't forget to add to our reputation by clicking the star icon in the bottom left-hand corner of a post.

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: OFFSET COUNTA Named ranges in a table

    It looks like you only want to include the numeric values in the range but using COUNTA(11:11) it's also including the row header which is a text value.

    Maybe this...

    =D11:INDEX(11:11,MATCH(1E100,11:11))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Registered User
    Join Date
    06-18-2013
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: OFFSET COUNTA Named ranges in a table

    Thanks for your comments.

    I seem to have solved this issue with the following adjustment:

    =OFFSET(C11,,,,COUNTA(11:11))

    It seems ignoring rows, columns and height (i.e. ,,,,) completes the formula. However, I'm not sure why leaving them blank would work while 0,0,1 does not.

    Regards.

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: OFFSET COUNTA Named ranges in a table

    When leaving some of the arguments empty, they default to certain values.

    The default for rows and columns is 0.
    The default for height and width is 1.

    =OFFSET(C11,,,,COUNTA(11:11))

    Offset cell C11
    0 rows
    0 columns
    1 row(s) high
    COUNTA(11:11) column(s) wide

+ 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. [SOLVED] named ranged - offset & counta
    By milo1984 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-26-2014, 02:13 AM
  2. [SOLVED] Offset with Counta for picture of dynamic table is adding extra row to pic
    By Steve N. in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-07-2014, 05:29 PM
  3. [SOLVED] Using Offset with named ranges
    By arno in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-06-2005, 09:05 PM
  4. [SOLVED] Using Offset with named ranges
    By StanJ in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 PM
  5. [SOLVED] Using Offset with named ranges
    By StanJ in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM

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