+ Reply to Thread
Results 1 to 3 of 3

VBA - Insert row, copy contents of original row except for contents of column A

  1. #1
    Forum Contributor
    Join Date
    04-29-2010
    Location
    Tallahassee, FL
    MS-Off Ver
    365
    Posts
    100

    Smile VBA - Insert row, copy contents of original row except for contents of column A

    Hi. I am using the code below to insert a row by double-clicking a cell. The code then copies formulas (and apparently dates) from the original row to the new row. Is there any way for me to adjust this code so the cell in column A is blank after the insert? If so, I need it to work like this for all 30+ pages of the workbook. Here's the code I have in ThisWorkbook:

    Please Login or Register  to view this content.

    Thanks!
    Last edited by Royzer; 02-22-2012 at 11:16 AM.

  2. #2
    Forum Contributor
    Join Date
    04-29-2010
    Location
    Tallahassee, FL
    MS-Off Ver
    365
    Posts
    100

    Re: VBA - Insert row, copy contents of original row except for contents of column A

    It's been solved. Here's the new code:
    Please Login or Register  to view this content.
    Thanks!

  3. #3
    Valued Forum Contributor smuzoen's Avatar
    Join Date
    10-28-2011
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2003/2007/2010
    Posts
    610

    Re: VBA - Insert row, copy contents of original row except for contents of column A

    If you want to make the cell in column A blank you would just add in one line to the last section
    Please Login or Register  to view this content.
    By placing this macro in ThisWorkbook as you have done it will work on every sheet in the workbook. You do realise that the line
    Please Login or Register  to view this content.
    Will remove any values that are in the sheet that are not the result of formulas e.g if you have placed the number 5 in a cell and run the macro on the row with this number then the number 5 will be cleared. This also goes for any text that is not the result of formulas - if you don't want that to happen then remove that line of code.
    Hope this helps.
    Anthony
    Pack my box with five dozen liquor jugs
    PS: Remember to mark your questions as Solved once you are satisfied. Please rate the answer(s) by selecting the Star in the lower left next to the Triangle. It is appreciated?

+ 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