+ Reply to Thread
Results 1 to 6 of 6

Deleting columns without messing up formulas

  1. #1
    Registered User
    Join Date
    09-02-2016
    Location
    US
    MS-Off Ver
    2013
    Posts
    50

    Deleting columns without messing up formulas

    This simple addition subtraction but I'm stuck...

    A basic sample is attached.

    1) I have a formula that incorporates the value that is to the left. However, if i need to update the sheet and delete a column, it throws off the whole thing...
    I get the #REF error....I thought excel was smart enough to know to that if there's still a value "to the left" to use it....Is there another alternative? or is this a limitation of excel?

    2) Also, If I add a column how can I make it have the same formatting as one of the neighboring columns? If I have a lot of rows, it wouldn't be practical to drag and update each formula.
    Attached Files Attached Files

  2. #2
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 365
    Posts
    2,406

    Re: Deleting columns without messing up formulas

    Perhaps somethig like this, pls follow this link

    (link removed)

    cheers
    Last edited by JBeaucaire; 09-10-2016 at 02:35 AM.

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Deleting columns without messing up formulas

    I have removed the link above Azumi. Here is your file. Please use the GO ADVANCED > MANAGE ATTACHMENTS to attach files consistently to threads. Thanks.
    Attached Files Attached Files
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

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

    Re: Deleting columns without messing up formulas

    B5=SUM($A5,SUM($B3:B3),-SUM($B4:B4)) OR
    B5=SUM(INDEX($A5:B5,COLUMN()-1),B3,-B4)
    Try this and copy towards right
    if you insert the column copy the formula from besides cells
    Samba

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

  5. #5
    Registered User
    Join Date
    09-02-2016
    Location
    US
    MS-Off Ver
    2013
    Posts
    50

    Re: Deleting columns without messing up formulas

    Quote Originally Posted by nflsales View Post
    B5=SUM($A5,SUM($B3:B3),-SUM($B4:B4)) OR
    B5=SUM(INDEX($A5:B5,COLUMN()-1),B3,-B4)
    Try this and copy towards right
    if you insert the column copy the formula from besides cells


    Thank you so much nflsales! This one worked!!!! I wasn't able to get the indirect azumi mentioned to update. I'm using the first one you mentioned. This is awesome, thank you!

  6. #6
    Registered User
    Join Date
    09-02-2016
    Location
    US
    MS-Off Ver
    2013
    Posts
    50

    Re: Deleting columns without messing up formulas

    Quote Originally Posted by nflsales View Post
    B5=SUM($A5,SUM($B3:B3),-SUM($B4:B4)) OR
    B5=SUM(INDEX($A5:B5,COLUMN()-1),B3,-B4)
    Try this and copy towards right
    if you insert the column copy the formula from besides cells
    My workbook is very large and overloaded with formulas and I'm already having issues with it running slow. which of the two formulas would you recommend to use if I needed each row with that formula repeated 2000 times? So far, I prefer the first one but would summing the whole row be taxing for excel or do you think it should be fine?
    Last edited by Questionz; 09-20-2016 at 08:56 AM. Reason: the rows are about 25 columns across then repeated 2000 times downward.

+ 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] Sort & add columns without messing up formulas
    By CLR in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 07:05 AM
  2. [SOLVED] Sort & add columns without messing up formulas
    By kate in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM
  3. Sort & add columns without messing up formulas
    By kate in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-08-2005, 12:05 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