+ Reply to Thread
Results 1 to 5 of 5

Adding a row below the active cell - doesn't always work first time

  1. #1
    Registered User
    Join Date
    04-17-2017
    Location
    Brasdford
    MS-Off Ver
    365
    Posts
    2

    Adding a row below the active cell - doesn't always work first time

    I have a sheet where users can fill in columns A to M, N through RH contain formulas.

    I want them to be able to click a button while any cell in the row is active that un-protects sheet, adds the row below and copies in all the formulas.

    It works if they have column A active, however if its a higher column then some formulas don't get copied, however if they press the button again the next row is added with all the formulas populated correctly.

    I'm trying to set the active cell to column A first before the formulas are filled in but I'm obviously getting this badly wrong. I'm far more used to using the macro recorder, trying to edit things myself is new to me.
    Thank-you for any help offered.

    Please Login or Register  to view this content.
    Last edited by jeffreybrown; 04-17-2017 at 05:33 PM. Reason: Please use code tags!

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,445

    Re: Adding a row below the active cell - doesn't always work first time

    That looks as though it inserts a row BEFORE the Active Cell.

    You don't really need to Select cells but, if you must, try:

    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Adding a row below the active cell - doesn't always work first time

    Please Login or Register  to view this content.
    Kind regards
    Leo

  4. #4
    Registered User
    Join Date
    04-17-2017
    Location
    Brasdford
    MS-Off Ver
    365
    Posts
    2

    Re: Adding a row below the active cell - doesn't always work first time

    A BIG thank-you to both TMS and LeoTaxi.

    TMS - your suggestion worked a charm, sheet up and running as I need it too. I appreciate you must find it an inelegant way to do something.

    Leo - Thank-you very much for taking the time to show me a 'more correct' way to approach it. I shall have to invest some time to get my head round what you have done.

    Very much appreciated, cheers

    Peter

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,445

    Re: Adding a row below the active cell - doesn't always work first time

    You're welcome. Thanks for the rep.

+ 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. Microsft Query: Time stamp parameter cell doesn't work.
    By srinupedipina in forum Excel General
    Replies: 0
    Last Post: 09-12-2016, 08:19 PM
  2. Send email via gmail using active x button doesn't work
    By Robee82 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-22-2016, 04:07 PM
  3. Adding columns doesn;t work
    By edwardag in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 10-25-2012, 11:18 AM
  4. Workbooks.Count doesn't work when excel cell is active
    By nivanov in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-05-2009, 12:58 PM
  5. Adding Time: Adding individual cells works, but SUM doesn't
    By fredmeister in forum Excel General
    Replies: 17
    Last Post: 04-11-2008, 10:40 AM
  6. Macro doesn't work if on wrong active sheet
    By shternm in forum Excel General
    Replies: 1
    Last Post: 02-02-2005, 09:05 PM
  7. [SOLVED] Excel 97 - Adding Every 8th Row - Formula should work, but doesn't
    By Damaeus in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 01-23-2005, 01:06 PM

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