+ Reply to Thread
Results 1 to 4 of 4

Inserting a row in the middle of a table corupting original formula

  1. #1
    Registered User
    Join Date
    06-25-2011
    Location
    Scotland
    MS-Off Ver
    Excel 2013 / 2016
    Posts
    69

    Inserting a row in the middle of a table corupting original formula

    Hi,
    I have attached a test file of what I'm trying to do. Basically the user will add a tag ID in col A....As there could be multiple ID tags I had to make a formula in col B to add a sequential letter (Eg 101 a, 102 a, 103 a, 103 b, 103 c, 104 a). The problem is if a later entry (new row) into 103 is needed, it upsets the formula in col B. Note Col B will be PW protected.
    Test log.xlsm

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Inserting a row in the middle of a table corupting original formula

    Probably the easiest way yo overcome this, is to go to the cell in B above where the row was inserted, and copy the formula down again. You could probably write a small macro to do that for you
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Inserting a row in the middle of a table corupting original formula

    You've implemented an Excel Table, but have not exploited its native capabilities by using structured table references.

    Using your posted workbook...
    Put this formula in B2 and copy it to the bottom of your table.
    Please Login or Register  to view this content.
    Now, if you insert or delete a table row, the Excel Table will accommodate that change by preserving the formula.

    Note: I think if I put my mind to it, I could come up with a more elegant formula...but, that one seems to work.
    EDITED TO INCLUDE THIS ADDITIONAL COMMENT: I tried to shorten the formula I posted, but didn't have any luck.

    Does that help?
    Last edited by Ron Coderre; 11-23-2014 at 06:03 PM.
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  4. #4
    Registered User
    Join Date
    06-25-2011
    Location
    Scotland
    MS-Off Ver
    Excel 2013 / 2016
    Posts
    69

    Re: Inserting a row in the middle of a table corupting original formula

    Yup, That will do the trik.....Thank You!!

+ 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. Inserting a picture symbol into cell while retaining original text
    By EmmaO91 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-22-2014, 04:22 AM
  2. changing formula in middle of excel table
    By paramnayak in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-19-2013, 10:45 AM
  3. Inserting rows:middle of sorting
    By ckim8 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-09-2010, 05:25 AM
  4. Replies: 2
    Last Post: 06-02-2006, 02:00 PM
  5. Inserting a single character into the middle of a 3 GB file
    By R Avery in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-06-2005, 01:06 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