+ Reply to Thread
Results 1 to 14 of 14

Incorrect autofill formula when inserting a new row

  1. #1
    Registered User
    Join Date
    02-20-2024
    Location
    Australia
    MS-Off Ver
    Home
    Posts
    5

    Incorrect autofill formula when inserting a new row

    Hi, I'm new to this forum. I'm working on a spreadsheet that uses the IF function in a table. When dragging the formula down it auto fills correctly, but when inserting a new row it auto fills correctly up to the last reference which it duplicates then then the value below skips one. I have attached a some screen shots. Any help would be greatly appreciated. [ATTACH]860340[/ATTACIF error.xlsxH]IF function with error.PNG
    Attached Images Attached Images
    Last edited by Damomac123; 02-20-2024 at 10:43 PM.

  2. #2
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: Incorrect autofill formula when inserting a new row

    Welcome to the forum.

    Letter too small for me to read, there is nothing better then a file, please attach one and help us to help you.

  3. #3
    Registered User
    Join Date
    02-20-2024
    Location
    Australia
    MS-Off Ver
    Home
    Posts
    5

    Re: Incorrect autofill formula when inserting a new row

    Rodger, i have attached.

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: Incorrect autofill formula when inserting a new row

    As it appears that cells J17:O17 should be blank, please paste the following into cell J17, copy over to cell O17 and then down to the last row of the table:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: Incorrect autofill formula when inserting a new row

    And if cells J17:O17 were not blank you wouldn't have the problem with new rows.

  6. #6
    Registered User
    Join Date
    02-20-2024
    Location
    Australia
    MS-Off Ver
    Home
    Posts
    5

    Re: Incorrect autofill formula when inserting a new row

    Thanks for the reply, I tried pasting into the worksheet where you said and not it does not perform the operation of the worksheet.

  7. #7
    Registered User
    Join Date
    02-20-2024
    Location
    Australia
    MS-Off Ver
    Home
    Posts
    5

    Re: Incorrect autofill formula when inserting a new row

    II put the formula in J17:O17 and it still producers a a inconsistent formula when autofilling, i,e duplicate last reference then the next row will skip one.Capture.PNG
    Last edited by Damomac123; 02-23-2024 at 09:14 PM.

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

    Re: Incorrect autofill formula when inserting a new row

    As DJ has explained, you need to have a formula ... "the" formula in the first row of the table. That's what Excel will use to replicate the formula in new rows. If you don't have a formula in the first row of the table, Excel gets confused. The formula Jetemec has given you checks the row number and, if it is 17, it returns a null value (to all intents and purposes, blank). If it is not, that is for the rest of the table, it processes the formula. Once you have established the new formula, you need to copy it down to all rows in the table to establish consistent formulae.

    You should then find that, if you edit any cell in a column, it will ripple through the entire column. And, if you insert a row, it should replicate correctly.
    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


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

    Re: Incorrect autofill formula when inserting a new row

    I think the formula needs a slight tweak:

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

  10. #10
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: Incorrect autofill formula when inserting a new row

    @TMS, I agree with your tweak, however when I turned off Show Formulas in the original file it displayed FALSE in the cells with formulas, so I assumed that is what the OP wants.

    Here is the file from post #1 with the formula from post #4 applied.
    When I insert a table row (20), not a sheet row, the formula does not duplicate the last reference nor skip the next one.
    Let us know if you have any questions.
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    02-20-2024
    Location
    Australia
    MS-Off Ver
    Home
    Posts
    5

    Re: Incorrect autofill formula when inserting a new row

    Thankyou, works perfectly! Not sure what i was doing wrong. I will have a play with that formula to try and understand further. One question i do have is what is the reference table 2931?

  12. #12
    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,457

    Re: Incorrect autofill formula when inserting a new row

    It's the name of the Sructured Table.


    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  13. #13
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: Incorrect autofill formula when inserting a new row

    You're Welcome and thank you for the feedback. as TMS stated, please take a moment to mark the thread as 'Solved'. I hope that you have a blessed day.

  14. #14
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: Incorrect autofill formula when inserting a new row

    Tks for the feedback and give a better name for the table.

+ 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. autofill formula when inserting rows in excel
    By Bholasaurabh in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-21-2021, 10:58 AM
  2. Autofill columns with formula when inserting new rows
    By browne09 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-20-2019, 10:54 AM
  3. VBA formula incorrect, not sure why
    By cmccabe in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-27-2014, 03:09 PM
  4. [SOLVED] Forumula Results Incorrect when data missing. Wanting to hide the incorrect formula.
    By firemedic6265 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 02-05-2014, 05:01 PM
  5. TIP: Inserting "fake" source row numbers using autofill
    By OllieB in forum Tips and Tutorials
    Replies: 1
    Last Post: 01-20-2013, 08:38 AM
  6. Replies: 0
    Last Post: 09-17-2012, 08:24 AM

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