+ Reply to Thread
Results 1 to 9 of 9

Macro for copying formulas + inserting rows

  1. #1
    Forum Contributor Marco-Kun's Avatar
    Join Date
    04-14-2009
    Location
    Holland
    MS-Off Ver
    Dutch:2007
    Posts
    298

    Macro for copying formulas + inserting rows

    I was tired of making my list smaller to upload it here, so I uploaded the complete thing on megaupload :P Here is the link:

    http://www.megaupload.com/?d=1W6PBADE

    On the bottom of the list is a button; "Add New Anime". When you click on that you get a UserForm where you can enter; Title, Type, Total Episodes, D/L Eps and Watched Episodes. When you press ''Add Anime" the entered values are entered at the bottom of the list, underneath the corresponding list names on the top.

    Now there are 4 list names left (Left, Status, Status 2, and Progress (%)) I still have to make a option to enter Status 2 as well in the UserForm.

    Now the question:
    In columns F (Left), H (Status) and I (Progress (%)) are formulas. How can I copy those formulas automatically when I add something new with the UserForm? And can it automatically insert a new row, since I have to move the buttons down with every new title.

    I hope I made sense

    Thanks
    Marco-Kun
    Last edited by Marco-Kun; 04-25-2009 at 09:37 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro for copying formulas + inserting rows

    Put your cursor anywhere in your existing list.

    Press CTRL-L to activate Excel's built-in "LIST" feature.

    Now use your buttons to add an entry to the bottom of the list...zz-something. When you click ADD ANIME it will put at the end, the LIST function will extend the existing "LIST" by one row and the cells with formulas in them will be copied down automatically.

    When I do this, the buttons seems to move down on their own.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Contributor Marco-Kun's Avatar
    Join Date
    04-14-2009
    Location
    Holland
    MS-Off Ver
    Dutch:2007
    Posts
    298

    Re: Macro for copying formulas + inserting rows

    Thanks for your fast reply ^^ That worked very nice for the formulas But it doesn't insert a new row, it doesn't push the buttons down either.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro for copying formulas + inserting rows

    Hm, it does for me. How odd.

  5. #5
    Forum Contributor Marco-Kun's Avatar
    Join Date
    04-14-2009
    Location
    Holland
    MS-Off Ver
    Dutch:2007
    Posts
    298

    Re: Macro for copying formulas + inserting rows

    Weird indeed. Look at the file added to see what happens for me. The buttons stay at the same place and overlaps the text ...
    Attached Images Attached Images

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro for copying formulas + inserting rows

    OK. Make sure you've turned on the LIST function. Then change the ADD ANIME code to this:
    Please Login or Register  to view this content.
    I've colored my additions to make them easy to spot.

  7. #7
    Forum Contributor Marco-Kun's Avatar
    Join Date
    04-14-2009
    Location
    Holland
    MS-Off Ver
    Dutch:2007
    Posts
    298

    Re: Macro for copying formulas + inserting rows

    Thank you! That works Now the shapes do move one rule down when I add another title.

    I have another question now. I will make another thread in a few minutes.
    Thanks for this one ^^

  8. #8
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983

    Re: Macro for copying formulas + inserting rows

    If your problem is resolved please mark your thread as Solved

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

  9. #9
    Forum Contributor Marco-Kun's Avatar
    Join Date
    04-14-2009
    Location
    Holland
    MS-Off Ver
    Dutch:2007
    Posts
    298

    Re: Macro for copying formulas + inserting rows

    I did, one minute before you posted :P

+ 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