+ Reply to Thread
Results 1 to 6 of 6

Insert Row after data entry

  1. #1
    Registered User
    Join Date
    07-19-2012
    Location
    Norway
    MS-Off Ver
    Excel 2003
    Posts
    24

    Unhappy Insert Row after data entry

    What I Want to do is the following:

    In the Sheet "Bob"
    When I make a change in a cell value in collumn C (say C4)
    I would like to insert a row under the active cell (in this case row 4)
    and copy the formulas and formating (border and colors)the row where i made the change (in this case row 4) (or I could have a copy of the formulas in row 4, copy that row and insert in the row under 4)... this way Row 5 will be empty

    Then I would like C4 to be the active cell

    The values of column C is derived and data validated form a list. The point is if I change the value in a cell in column C from blank, to say "Shoe", it inserts a row below and copy the formulas from the "Shoe-row" to the this. If I Change "Shoe" to say "Cat"... the above still should apply. The whole point is to expand an account as I enter values in column C.

    All the data (formulas) in the cells are easy If-then statements, like:
    =IF(ISERROR(IF(Settings!H7="Nn";0;Oppsett!D8*Account!E14));"";(IF(Settings!H7="No";0;Oppsett!D8*Account!E14)))


    The values of column C is derived and data validated form a list. The point is if I change the value in a cell in column C from blank, to say "Shoe", it inserts a row below and copy the formulas from the "Shoe-row" to the this. If I Change "Shoe" to say "Cat"... the above still should apply

    I´ve tried this:

    ___________
    Please Login or Register  to view this content.
    _____________


    "
    I put the row with the data of interest in the worksheet "Oppsett", However, excel freezes up.


    I´ve tried this as well:


    _____________
    Please Login or Register  to view this content.
    ________

    The vba freezes at the line:
    ActiveSheet.Range("a65536").End(xlUp).Offset(1, 0).EntireRow.PasteSpecial Paste:=xlPasteFormulas


    By the way
    I´ve used this formula to timestamp the entries from the C column eg:
    =IF(C14<>"";IF(B14="";TODAY();B14);"") and in the settings set maximum iteration to 1...


    Help would be much appreciated!

    Regards
    Last edited by Peltz; 11-11-2013 at 05:06 PM.

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Easy VBA, stupid user.

    see how close this gets you. You might also want to put code tags around your code before one of the mods comes on here and yells at you:

    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Easy VBA, stupid user.

    You may also want to consider changing your thread title as well.

  4. #4
    Registered User
    Join Date
    07-19-2012
    Location
    Norway
    MS-Off Ver
    Excel 2003
    Posts
    24

    Re: Easy VBA, stupid user.

    Brilliant! Thank you so much. The only thing left is that i need the value in the C collumn in the new row to be blank, suggestions?

    And thanks for the heads up. Now I´ll just have to figure out how to change the thread title

  5. #5
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Insert Row after data entry

    Please Login or Register  to view this content.

  6. #6
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Easy VBA, stupid user.

    Quote Originally Posted by Peltz View Post
    Brilliant! Thank you so much. The only thing left is that i need the value in the C collumn in the new row to be blank, suggestions?

    And thanks for the heads up. Now I´ll just have to figure out how to change the thread title
    To change the title of the thread, click EDIT on the original post, then click the Go Advanced button, then change the title. If two or more days have passed, the EDIT button will not appear, and you need to ask a moderator to change the title.

+ 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. Easy Question but I feel stupid.
    By Sunday33 in forum Excel General
    Replies: 6
    Last Post: 09-14-2013, 03:58 PM
  2. Easy lookup question - I.R.Stupid
    By BrakZak in forum Excel General
    Replies: 2
    Last Post: 03-06-2007, 05:50 AM
  3. [SOLVED] Is there a user easy way to change the active sheet name
    By Brad Withrow in forum Excel General
    Replies: 1
    Last Post: 04-11-2006, 12:30 AM
  4. new user with easy question? not easy for me
    By speakeztruth in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 06-03-2005, 05:05 PM
  5. [SOLVED] User Defined Functions - Help Text - Make it Easy for the User
    By Andibevan in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-17-2005, 06: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