+ Reply to Thread
Results 1 to 3 of 3

Insert rows and copy formula

  1. #1
    Registered User
    Join Date
    03-26-2013
    Location
    Bucharest
    MS-Off Ver
    Excel 2010
    Posts
    18

    Insert rows and copy formula

    Hi all,

    I have the code below for inserting a certain no of rows and copy the formula. From the selected cell it inserts and copy the upper row

    What I would like to do and can't by myself due to my limited knowledge about VBA:
    1. To automatically run the macro only if in column A I have "yes"
    2. To copy the selected row (the one where is "yes" in column A) and to insert rows below it.
    3. To replace all "yes" findings in column A with "no"

    Thank you all for your help!

    Please Login or Register  to view this content.
    Last edited by costin; 07-05-2013 at 09:40 AM.

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

    Re: Insert rows and copy formula

    A few questions -

    How many rows should be inserted below the row containing "yes"?

    Also, you said
    To replace all "yes" findings in column A with "no"
    which findings? The current row which triggered the macro should be changed to "No" ?
    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]

  3. #3
    Registered User
    Join Date
    03-26-2013
    Location
    Bucharest
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Insert rows and copy formula

    After the VBA will run, it will pop up a text pop where you can input the no of rows and it will insert that no. This is already done in the code I attached.

    About that "yes" replacement: it should automatically run the macro only if in column A I have "yes". So, after the programming is finished it should replace that "yes" from A column which triggered the macro running.

    To be honest, my point 3 is not that important. I'm interested more into my first 2 questions.
    I'm very sorry cause I can't upload a sample, I'm currently at work and firewall doesn't allow me.

+ 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