+ Reply to Thread
Results 1 to 11 of 11

Insert Row Below and Copy Values from Row Above

  1. #1
    Registered User
    Join Date
    01-11-2010
    Location
    USA
    MS-Off Ver
    2010
    Posts
    48

    Insert Row Below and Copy Values from Row Above

    Does anyone know how do I modify this so it takes the values from the above row (the row of the active cell) and inserts them into the new row below. I need it to only copy the values from Columns A, B, C, J, K, and L. Is this possible?

    Please Login or Register  to view this content.
    Any help would be excellent. Thanks in advance for any help you can provide.

  2. #2
    Registered User
    Join Date
    01-11-2010
    Location
    USA
    MS-Off Ver
    2010
    Posts
    48

    Re: Insert Row Below and Copy Values from Row Above

    Anyone with any idea?

  3. #3
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Insert Row Below and Copy Values from Row Above

    Its not always good to use "Activecell", considering that if you click anywhere else in your file, it may render your code useless or ineffective.

    Maybe you can give us some more info or some more code that you have. Which is the activecell? Is it the last cell with data in your sheet?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  4. #4
    Registered User
    Join Date
    01-11-2010
    Location
    USA
    MS-Off Ver
    2010
    Posts
    48

    Re: Insert Row Below and Copy Values from Row Above

    Project_Manager (Test).xlsm

    I have attached my workbook. You will see that when you click on any cell within a row and hit the 'Insert Row' button, a row is inserted below. I want that row to be populated with values from the above row. You'll see that it's a project manager in the making. I have projects and tasks below. I want to be able to click on a cell within a project and click insert row and have a new row with values populated. I am comfortable having it 'ActiveCell', but it can't happen that way, I'm open to anything else.

    Let me know if you need anything else.

    You'll notice a bunch of other macros. Disregard those, please. They pertain to the master file.

  5. #5
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Insert Row Below and Copy Values from Row Above

    Hi tschrader,

    Try this:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  6. #6
    Registered User
    Join Date
    01-11-2010
    Location
    USA
    MS-Off Ver
    2010
    Posts
    48

    Re: Insert Row Below and Copy Values from Row Above

    Thanks! How can I modify that to copy only the values from fields 1, 2, 3, and 8? I tried modifying your code, but I don't understand it :-I can you help?

  7. #7
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Insert Row Below and Copy Values from Row Above

    Hi tshrader,

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    01-11-2010
    Location
    USA
    MS-Off Ver
    2010
    Posts
    48

    Re: Insert Row Below and Copy Values from Row Above

    It isn't pulling the value from field 3. I would modify the code to do this normally, but I'm not that advanced in VBA, and I still don't know how your code works exactly. Pardon my lack of knowledge.

  9. #9
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Insert Row Below and Copy Values from Row Above

    Hi tshrader,

    You want rows 2,3,4 and 8!

    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    01-11-2010
    Location
    USA
    MS-Off Ver
    2010
    Posts
    48

    Re: Insert Row Below and Copy Values from Row Above

    xladept,

    Sorry to confuse you. Mixing up table columns with sheet columns didn't help my understanding. I'm glad you were able to see through my misunderstanding.

    Thank you very much!!

  11. #11
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Insert Row Below and Copy Values from Row Above

    Hi tshrader,

    You're welcome.

+ 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