+ Reply to Thread
Results 1 to 5 of 5

Increment additional INDEX row number when inserting rows above

  1. #1
    Registered User
    Join Date
    05-15-2012
    Location
    Brisbane
    MS-Off Ver
    Excel 2010
    Posts
    34

    Increment additional INDEX row number when inserting rows above

    Hi all

    I have multiple INDEX sum ranges (3) and when I insert a line using a macro to the top table, the subsequent row starting points remain the same and do not increment, any idea I whenever I insert a line subsequent rows will increment automatically?

    INDEX issue.jpg

    This is the forumla I am using for the first table

    =SUM(INDEX(BB:BB, 5):INDEX(BB:BB, ROW()-1))

    and this for the second

    =SUM(INDEX(BB:BB, 18):INDEX(BB:BB, ROW()-1))

    But 18 doesnt move when I insert lines?

    Any help is appreciated.

    Thanks
    Sean

  2. #2
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Increment additional INDEX row number when inserting rows above

    use Row(B5) instead of 5 and Row(B18) instead of 18
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  3. #3
    Registered User
    Join Date
    05-15-2012
    Location
    Brisbane
    MS-Off Ver
    Excel 2010
    Posts
    34

    Re: Increment additional INDEX row number when inserting rows above

    Quote Originally Posted by nflsales View Post
    use Row(B5) instead of 5 and Row(B18) instead of 18
    Thanks Siva but when I try that it says I have entered to few arguments?

  4. #4
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Increment additional INDEX row number when inserting rows above

    =SUM(INDEX(BB:BB, row(B5)):INDEX(BB:BB, ROW()-1))
    =SUM(INDEX(BB:BB, row(B18)):INDEX(BB:BB, ROW()-1))
    Try like above

  5. #5
    Registered User
    Join Date
    05-15-2012
    Location
    Brisbane
    MS-Off Ver
    Excel 2010
    Posts
    34

    Re: Increment additional INDEX row number when inserting rows above

    Genius, thank you very much Siva

+ 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] Macro to add additional new rows based on number in a call
    By Courto in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-05-2014, 06:13 AM
  2. [SOLVED] Automatically increment to next number after 55 rows
    By sagar007 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-02-2013, 06:56 AM
  3. Increment columns in INDEX and MATCH formula - ROWS and COLUMNS
    By nickmangan in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2012, 10:38 AM
  4. Auto increment Rows Number in a column using VB
    By chancw in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-04-2012, 01:28 PM
  5. Formula Required to increment value after N number of rows
    By bakshi.ishan in forum Excel General
    Replies: 6
    Last Post: 10-01-2011, 03:04 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