+ Reply to Thread
Results 1 to 5 of 5

Insert/delete row on 2 sheets in the same location by short key

Hybrid View

  1. #1
    Registered User
    Join Date
    08-06-2013
    Location
    Port Moresby, Papua New Guinea
    MS-Off Ver
    Excel 2007
    Posts
    2

    Insert/delete row on 2 sheets in the same location by short key

    Hallo everyone,
    I am a novice with VBA and macros and was wondering if anyone can help me out with the following;
    I have 2 sheets (labeled “Timesheet” and “Formula”) for calculating team timesheets. I want both sheets to be protected as I do not want users to edit formula and formats. I then need one/two macro(s) to allow users to be able to add new a row if a new employee joins the team or delete the respective row if an employee leaves the team. i.e.
    1. Unprotect both the sheets (same password for both: toyota1)
    2. Insert a row by short cut (ctrl + r) below the active cell in the same location on both the “Timesheet” and “Formula” Sheets.
    3. Copy formatting down from row above to new row.
    4. Copy formula down to new row.
    5. Protect both sheets again.
    And / or also
    1. Unprotect both sheets
    2. Delete the row that contains the active cell by short cut (ctrl + w) in the same location on both sheets
    3. Protect both sheets again.
    I would be grateful for any help
    Cheers
    Proposed TimeSheet Template6.xlsx

  2. #2
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Insert/delete row on 2 sheets in the same location by short key

    Maybe Attachment 260340
    Thanks,
    Solus


    Please remember the following:

    1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    Highlight the code in your post and press the # button in the toolbar.
    2. Show appreciation to those who have helped you by clicking below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

    "Slow is smooth, smooth is fast."

  3. #3
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Insert/delete row on 2 sheets in the same location by short key

    Hi Nokondi,

    Here's my offering - it seems like the PasteSpecial Formulas and Formats needs work

    Proposed TimeSheet Template6.xlsm
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  4. #4
    Registered User
    Join Date
    08-06-2013
    Location
    Port Moresby, Papua New Guinea
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Insert/delete row on 2 sheets in the same location by short key

    Hi XeRo Solus & xladept,

    Thank you both so much for your prompt assistance. It took me a week to try some VBA coding myself but whenever something works, another did not. Anyway, both your inputs are exactly what I need (although different in some aspects) and I am submitting both to my team to decide on. Thanks.

    Cheers

  5. #5
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Insert/delete row on 2 sheets in the same location by short key

    Hi nokondi,

    Perhaps a combination of our efforts

+ 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. key board short cut for insert cut cells
    By R. D. Childers in forum Excel General
    Replies: 8
    Last Post: 05-07-2015, 05:02 AM
  2. how to insert ole object textbox at particular location
    By pankajy18 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-09-2013, 01:02 PM
  3. Replies: 0
    Last Post: 11-08-2012, 01:07 PM
  4. Replies: 2
    Last Post: 04-18-2011, 01:56 AM
  5. Insert Row at Variable Location
    By agentred in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-04-2009, 12:35 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