+ Reply to Thread
Results 1 to 3 of 3

Way to have Array Formula automatically adjust when rows added

  1. #1
    Forum Contributor
    Join Date
    10-02-2013
    Location
    Houston, TX
    MS-Off Ver
    office 365
    Posts
    638

    Way to have Array Formula automatically adjust when rows added

    I have an array formula that only brings over rows that are not Blank It works OK until you add rows to the other sheet.
    Please Login or Register  to view this content.
    when rows are added the the Daily Chgs the Formula will adjust say i add 10 rows then $B$3:$B$45 Becomes $B$3:$B$55 But the rest ROW($A$1:$A$43) does not change
    It should be ROW($A$1:$A$53) -

    I'm Not sure how to modify this to adjust properly When it does not adjust properly it displays no information in cell.

    Maybe there is another way to accomplish this?
    Attached Files Attached Files

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Way to have Array Formula automatically adjust when rows added

    You could use a dynamic named range

    Name: myColumn RefersTo: ='Daily Chgs'!$B:$B
    Name: myRange RefersTo: =INDEX(myColumn, 3, 1):INDEX(myColumn, COUNTA(myColumn), 1)

    Then your formula would become
    =IFERROR(INDEX(myColumn,SMALL(IF(myRange<>"",ROW(myRange)),ROW(A1))),"")

    You may need to subtract from the COUNTA() to account for headers in B1 and B2

    Alternatly, you could use, if you anticipate blank data rows and all the entries in col B to be text.
    Name: myRange RefersTo: =INDEX(myColumn, 3, 1):INDEX(myColumn, Match("zzzzz", myColumn),1)
    Last edited by mikerickson; 09-28-2014 at 03:36 PM.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  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: Way to have Array Formula automatically adjust when rows added

    if you change to and manually add rows
    =IFERROR(INDEX('Daily Chgs'!$B$3:$B$56,SMALL(IF('Daily Chgs'!$B$3:$B$56<>"",ROW('Daily Chgs'!$A$1:$A$56)),ROW(A1))),"")
    then a1:a56 changes
    "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

+ 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. Automatically copy to new rows to new rows as raw data is added on another worksheet
    By lanoushi in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-12-2013, 09:03 AM
  2. A formula that will automatically include newly added rows?
    By dbwoods11 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-09-2013, 03:53 AM
  3. Replies: 5
    Last Post: 04-03-2013, 04:15 PM
  4. [SOLVED] Automattically adjust code when rows or columns are added
    By Tulipo in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-05-2012, 05:28 PM
  5. Replies: 3
    Last Post: 02-14-2008, 02:39 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