+ Reply to Thread
Results 1 to 4 of 4

Macros - add column, update formula

  1. #1
    Forum Contributor
    Join Date
    10-28-2011
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    114

    Macros - add column, update formula

    Hello..

    On the attached example I have some costs shown as:
    - Original costs - user enters info.
    - Interest 1 , 2, 3 - calculated by formula
    - Total Costs - user inputs
    - Difference - calculated by formula

    Now what I would like is a macro that can add a 'Interest' column i.e. Interest 4, but also update the 'difference' formula between the 'Actual Costs' and the current 'Interest' rate (interest 4).

    Is there a way of doing this through a formula?? so that when I add Interest 5 using the same macro, the formula is automatically updated and does not take interest 4 into account.

    Hope i've explained this right!

    Many thanks!
    Attached Files Attached Files
    Last edited by sgp; 11-07-2011 at 11:06 AM.

  2. #2
    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
    48,994

    Re: Macros - add column, update formula

    You could change the formula in F2 to:

    =OFFSET($F2,0,-2)-OFFSET($F2,0,-1)

    That should allow you to insert a column without needing to adjust the formula.

    Regards
    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


  3. #3
    Forum Contributor
    Join Date
    10-28-2011
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    114

    Re: Macros - add column, update formula

    Thanks a ton! That works great!!!

  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
    48,994

    Re: Macros - add column, update formula

    You're welcome. Thanks for the rep. TMS

+ 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