+ Reply to Thread
Results 1 to 5 of 5

Inserting a row that carries formulas

  1. #1
    Registered User
    Join Date
    05-18-2011
    Location
    Houston
    MS-Off Ver
    Excel 2010
    Posts
    5

    Inserting a row that carries formulas

    Lets say I have cells A2:A6 containing formulas that depend on an entry into A1. I need a macro that, once a value is entered into A1, will insert a new row underneath A and carry with it the formulas into B2:B6 that now depend on an entry into B1. Copy and past will not work because D1:D6 MUST drop so that it does not end up getting overwritten. I have tried numerous things but none have worked. There are other functions in the spreadsheet but I think if I can figure out a solution for the above, I can make it all work together.

  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
    44,445

    Re: Inserting a row that carries formulas

    Not sure if this does what you want:

    Please Login or Register  to view this content.

    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
    Registered User
    Join Date
    05-18-2011
    Location
    Houston
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Inserting a row that carries formulas

    I tried the macro you gave me but could not get it to do anything at all. Blame my ignorance in VB.
    Here is the closest thing I have found but it only inserts a row above the defined range and copies/pastes the formulas from the above row. I need the formulas to change since they are now on the next row.

    Please Login or Register  to view this content.
    Basically I need the list to get longer without disturbing anything below the inserted row while maintaining the correct formulas. On top of that, I would like this to be executed without clicking a button if a certain cells value change to anything but zero.

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

    Re: Inserting a row that carries formulas

    Given that I don't know what your workbook, worksheets or formulae look like, it's difficult to provide anything other than a general piece of code ... which apparently doesn't work in the live workbook.

    Anything you'd like to share so that we may stop talking at cross purposes?

    Regards

  5. #5
    Registered User
    Join Date
    05-18-2011
    Location
    Houston
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Inserting a row that carries formulas

    I think I attached an example, hope it works. When ticker symbols are entered into B5 or B12, the stock quotes from msn are updated in the tables starting in R20 provided by the msn moneycentral investor stock quotes connection. The formulas in B7:O11 and B14:O17 pull information from the msn tables. The result is an update of all tables when adding or deleting a ticker symbol in B5 or B12. The problem is that if you were to add 4 more ticker symbols into B5, only 3 would appear in first table. The msn table would be updated but since the I ran out of room in the first table the 4th ticker would not appear. What I would like is something that adds a row between the first and second table and drops down the formulas so that everything remains uniform. I hope I explained it well enough. Any ideas.
    Attached Files Attached Files

+ 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