+ Reply to Thread
Results 1 to 3 of 3

VBA to insert row but row number changes everytime

  1. #1
    Registered User
    Join Date
    01-15-2013
    Location
    Moncton
    MS-Off Ver
    Excel 2016
    Posts
    95

    VBA to insert row but row number changes everytime

    I need some help to create a Macro to insert a row. I have achieved it with the record a macro function but there is one element that doesn't work the way I need. I want to assign this macro to button and when pressed it will ad a row under row 26. I want some cell to have copied text from above and some copy only the formula. I have achieved all this true the record macro. The issue is once the macro has run once the second time I want it to insert row below row 27. The next time below row 28 and so on. Anyway to achieve this.

  2. #2
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: VBA to insert row but row number changes everytime

    Is row 26 (and then 27, 28, etc.) the first blank row? Or is it a row in the middle of some data set.

  3. #3
    Registered User
    Join Date
    01-15-2013
    Location
    Moncton
    MS-Off Ver
    Excel 2016
    Posts
    95

    Re: VBA to insert row but row number changes everytime

    Before running the macro row 27 is blank but rows 28 and below has some data in them.

+ 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. Font keeps defaulting to Helvetica Neue 11 everytime I insert data
    By KAPearson in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-21-2012, 03:40 PM
  2. macro to insert 1 column with formulas everytime it run
    By aravindhan_31 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-07-2009, 11:44 AM
  3. [SOLVED] How do I add one to a number everytime I open the same workbook
    By Greg in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-02-2006, 09:35 AM
  4. A new sequence number in file everytime it is opened
    By Tiger Claw in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  5. [SOLVED] A new sequence number in file everytime it is opened
    By Tiger Claw in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 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