+ Reply to Thread
Results 1 to 9 of 9

excel dynamic range - showing extra row issue

  1. #1
    Forum Contributor
    Join Date
    07-08-2010
    Location
    ireland
    MS-Off Ver
    Excel 2007
    Posts
    121

    excel dynamic range - showing extra row issue

    Hi All,

    I am using following formula to show dynamic range but for some reason, when i click on the Name ranges, it is showing extra two row as it can be seen in the picture below.

    Wondering is there anything i am missing in this formula?

    Please Login or Register  to view this content.
    dynamic range.jpg

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: excel dynamic range - showing extra row issue

    Hard to say, looking at a pic - you dont show row numbers or column letters.

    Keep in mind that with OFFSET, you go dow X rows below the "starting cell", to you need to subtract (at least) 1

    upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,638

    Re: excel dynamic range - showing extra row issue

    Well, you've got at least one non-blank header row so that's going to skew your COUNTA.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Contributor
    Join Date
    07-08-2010
    Location
    ireland
    MS-Off Ver
    Excel 2007
    Posts
    121

    Re: excel dynamic range - showing extra row issue

    Hi All,

    Please see attached sample spreadsheet for your reference

    Should you require anything else, please let me know.

    Kind Regards,

    Offset.xlsx

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,638

    Re: excel dynamic range - showing extra row issue

    Personally, I'd use INDEX rather than OFFSET as OFFSET is volatile and INDEX isn't. I also find it easier to understand the relationship with what I'm counting.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    It's not a great idea, IMO, to have blank rows just so it looks pretty. It probably shouldn't be visible to the general public so it doesn't matter. The two non-blank cells above the list are what skews your OFFSET/COUNTA (as I suggested previously). And the two blank cells need to be catered for in the INDEX/COUNTA ... hence the +2.

    If you just want to fix your DNR, use:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    As I say, remove the blanks and you don't need to compensate in the INDEX/COUNTA. However, you will still need to include the -2 in in the OFFSET/COUNTA

    Regards, TMS

  6. #6
    Forum Contributor
    Join Date
    07-08-2010
    Location
    ireland
    MS-Off Ver
    Excel 2007
    Posts
    121

    Re: excel dynamic range - showing extra row issue

    Hi TMS,

    ITs really bit tricky and volatile.

    some column showing extra two row and some column showing one extra row. If i add -2 or -1, its loose the purpose of actual formula.

    Thanks for the shortcut

    Regards

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,638

    Re: excel dynamic range - showing extra row issue

    Not sure I understand what you are saying. Each DNR will depend on how many populated rows there are in the column.

    You probably need to post a more detailed sample workbook if you need further clarification.

    See the example.

    Regards, TMS
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    07-08-2010
    Location
    ireland
    MS-Off Ver
    Excel 2007
    Posts
    121

    Re: excel dynamic range - showing extra row issue

    Hi TMS,

    Its okay, i can use examples given in your workbook. It serve my need.

    Thanks for your time and effort.

    Kind Regards,

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,638

    Re: excel dynamic range - showing extra row issue

    You're welcome. Thanks for the rep.

+ 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. Creating Dynamic Range Using OFFSET and COUNTA Adds Extra Rows
    By jcox1953 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-25-2014, 12:44 PM
  2. add excel data in body email (data range is dynamic) & signature issue
    By Marijke in forum Outlook Programming / VBA / Macros
    Replies: 3
    Last Post: 11-25-2014, 05:41 AM
  3. [SOLVED] Issue w/dynamic named range causing Excel to crash
    By plasmas222 in forum Excel General
    Replies: 10
    Last Post: 03-07-2014, 08:18 PM
  4. Excel VBA - Copying Dynamic Range without Headers - Issue
    By Vinod Krishna.C in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-10-2014, 10:08 AM
  5. Replies: 0
    Last Post: 01-04-2013, 12:45 PM
  6. Replies: 3
    Last Post: 07-29-2010, 02:27 PM
  7. Dynamic Range Issue
    By mike21mcd in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 10-01-2007, 04:42 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