+ Reply to Thread
Results 1 to 13 of 13

Formula to auto update cells below when inserting a new row

  1. #1
    Registered User
    Join Date
    04-13-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2011
    Posts
    6

    Formula to auto update cells below when inserting a new row

    Hi, I'm sure this must be simple but cant work it out:

    I have a formula that fills down in the usual way referring to data in another sheet i.e 'Sheet1' A1 =Sheet2!A1 & 'Sheet1' A2 =Sheet2!A2 etc. Now if I insert a new row somewhere in the middle is it possible to make the formula update without having to drag the formula to refill the whole spreadsheet? Ideally by just updating the inserted row would have a knock on effect to the formulas in the rows below.

    For example: *Note I've simplified things, but this is the principle of what I want to do - dragging the formula to update all the cells isn't going to work for me.*

    Sheet1 Rows A1:A30 are picking up data from Sheet2 A1:A30.
    I insert a new row on Sheet1 at A16 and drag the formula to update A16 from above so that A16=Sheet2!A16.
    Now Sheet1 A17 also =Sheet2!A16 as it has retained it's previous formula, I want this to update automatically to Sheet1 A17=Sheet2!A17 and so on for the rows below.

    Maybe there's a setting that enables formulas to update on being moved?

    Thanks for any help!
    Last edited by onpoint; 04-13-2013 at 08:49 AM.

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Formula help please...

    Hi onpoint,

    welcome to the forum.

    Please change the thread title to reflect the query you are asking.. see the forum rules:-

    http://www.excelforum.com/forum-rule...rum-rules.html


    Regards,
    DILIPandey
    <click on below * if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  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,433

    Re: Formula help please...

    A1: =INDIRECT("Sheet2!" &CELL("address",A1))

    Copy down and across. You'll still need to copy the formula to the new row but the rows below will automatically adjust.


    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 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,433

    Re: Formula help please...

    @dilipandey: apologies for responding over your request for a title change. Busy checking the solution and didn't refresh the thread.

    @onpoint: please amend your thread title as requested.

    Regards, TMS

  5. #5
    Registered User
    Join Date
    04-13-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2011
    Posts
    6

    Re: Formula help please...

    Hi,

    Apologies, I've amended the title.

    @TMS Thanks for your reply, I've just given that a try however this works by me inserting a new row in sheet2 which then updates sheet1 references. I would like to be able to insert the new row into sheet1 and the cells referenced to have a knock on effect from there. Is that possible?

    Thanks

  6. #6
    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,433

    Re: Formula to auto update cells below when inserting a new row

    I'm a little confused. The formula I provided is for use in sheet1 and allows you to insert a row in sheet1 and it uses the cell reference on sheet1.

    If you insert rows in sheet2, the cell references in sheet1 will automatically update.

    I'm not sure that you can do what you want with a simple link and I suspect that it will quickly get out of sync.

    If the data that you have has a key field, a unique reference, then it would be better to use VLOOKUP or INDEX/MATCH to maintain the links between the two sheets.

    Regards, TMS

  7. #7
    Registered User
    Join Date
    04-13-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2011
    Posts
    6

    Re: Formula to auto update cells below when inserting a new row

    Thanks TMS, maybe what I'm trying to do isn't possible - I've probably not explained it to well...

    To simplify it, basically I want the formula to update to always be referencing the next row down from what the cell above is referencing
    e.g if cell A1 =sheet2!B2 & A2 =sheet2!B3 and I then change cell A1 =sheet2!B4 I'd want cell A2 to update to =sheet2!B5

    Thanks again for any help!

  8. #8
    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,433

    Re: Formula to auto update cells below when inserting a new row

    I'm sorry, I can't think of any way of doing that. Not to say it can't be done, I just don't have any idea how to do it.

    Why do you want to do it? Can you post a sample workbook with some examples of what you are trying to achieve.

    Regards, TMS

  9. #9
    Registered User
    Join Date
    04-13-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2011
    Posts
    6

    Re: Formula to auto update cells below when inserting a new row

    Ok no worries, thanks for your efforts!

    What I'm trying to do is create a sheet (1) which is formated in a layout/style that i want (with multiple sections of data)which then draws it's data from the other sheet (2). The input sheet (2) data would get updated from time to time and be pasted in from another document. If there is a variation in this input sheet from the last time (an extra row), I want to update sheet (1) to add the additional row/s with minimum effort e.g. what dragging the formula to update does is mess up the layout/style if I update the whole document in one go which then needs to be reformatted or update all the sections individually which doesn't mess up the layout/style but would be time consuming - both of these is what I'm trying to avoid.

    May well not be possible though...

    I've added an example spreadsheet to try to illustrate the scenario.

    Thanks!
    Attached Files Attached Files

  10. #10
    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,433

    Re: Formula to auto update cells below when inserting a new row

    I suspect that you will need VBA for this.

    Regards, TMS

  11. #11
    Registered User
    Join Date
    04-13-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2011
    Posts
    6

    Re: Formula to auto update cells below when inserting a new row

    Yeah, I was starting to think that would be the only way.

    Not to worry, thanks!

  12. #12
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Formula to auto update cells below when inserting a new row

    near as I can figure this would be the closest non vba way. it uses a helper column showing the row number you want and then a lot of INDEX formulas. the row number cells (except the first one) are calculated using =INDIRECT("R[-1]C",0)+1 so they will always be one more than the row immediately above
    Attached Files Attached Files
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  13. #13
    Registered User
    Join Date
    04-13-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2011
    Posts
    6

    Re: Formula to auto update cells below when inserting a new row

    Wow great work JP, I think I can work with that - thanks a lot!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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