+ Reply to Thread
Results 1 to 4 of 4

How to stop OFFSET including one blank row at the bottom of the range...?

  1. #1
    Forum Contributor
    Join Date
    04-19-2013
    Location
    Yorkshire, England
    MS-Off Ver
    Excel 2010
    Posts
    297

    How to stop OFFSET including one blank row at the bottom of the range...?

    I have data in a column with a heading in row one (not to be included in the data range).

    In the name manager I am using the formula:

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


    This excludes the header, and includes all the data but for some reason includes a blank cell at the bottom of the range and I can't figure out why

    Any ideas..?

    Cheers

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: How to stop OFFSET including one blank row at the bottom of the range...?

    That's because the COUNTA(G:G) counts the header too

    Try

    =OFFSET('Static Data for dropdowns'!$G$1,1,0,COUNTA('Static Data for dropdowns'!$G:$G)-1,1)

    or simply

    =OFFSET('Static Data For Dropdowns'!$G$2,0,0,COUNTA('Static Data For Dropdowns'!$G:$G)-1,1)
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  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: How to stop OFFSET including one blank row at the bottom of the range...?

    =OFFSET('static data for dropdowns'!$G$2,0,0,COUNTA('static data for dropdowns'!$G:$G)-1,1)
    the counta includes the header in g1 so if you had 5 entries g2:g6 then counta(G:G) would = 6 so offsettingheigt from g2 of 6 would reference g2:g7 hence the blank
    "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
    Forum Contributor
    Join Date
    04-19-2013
    Location
    Yorkshire, England
    MS-Off Ver
    Excel 2010
    Posts
    297

    Re: How to stop OFFSET including one blank row at the bottom of the range...?

    brilliant, thanks for the help guys!

+ 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. Dynamic Print Range not including blank rows with formulas
    By amartin575 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-12-2013, 11:49 AM
  2. Replies: 9
    Last Post: 10-12-2010, 12:37 PM
  3. Count blank cells within a range not including fully blank rows
    By twofootgiant in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 07-16-2008, 09:43 AM
  4. Finding the bottom non-blank cell in a range
    By Fenneth in forum Excel General
    Replies: 7
    Last Post: 07-06-2006, 01:10 PM
  5. Average range including blank cells: #DIV/0!
    By Areaka in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-12-2006, 05:21 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