+ Reply to Thread
Results 1 to 6 of 6

How to add or delete rows simultaneously in different sheets of the same worksheet

  1. #1
    Registered User
    Join Date
    05-21-2019
    Location
    Auburn Hills, Michigan
    MS-Off Ver
    2016
    Posts
    3

    How to add or delete rows simultaneously in different sheets of the same worksheet

    I have a worksheet that has 3 sheets that are linked to each other.
    I want to write a macro that deletes/adds a row in sheet 2 and sheet 3 when I delete/add a row in sheet 1.
    Problem is that I never wrote a macro till now.
    Please help.

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: How to add or delete rows simultaneously in different sheets of the same worksheet

    You don't have to do this in VBA. Select the sheets you want by holding down the CTRL key as you click on them. Then whatever you do to one sheet will happen to all of the selected sheets. You can add, delete rows or columns, change formats, add data and validations and even enter formulas. It's called a 3-D formula.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Registered User
    Join Date
    05-21-2019
    Location
    Auburn Hills, Michigan
    MS-Off Ver
    2016
    Posts
    3

    Re: How to add or delete rows simultaneously in different sheets of the same worksheet

    Thanks for your response.
    I tried grouping the sheets but it is not helping. I still insert a row on my first sheet, a blank row is not being inserted in my other to sheets.
    Please suggest an alternative.

  4. #4
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,516

    Re: How to add or delete rows simultaneously in different sheets of the same worksheet

    Did you have your so called first sheet included in the grouping?
    What dflak described works like a charm (if you do it right).

  5. #5
    Registered User
    Join Date
    05-21-2019
    Location
    Auburn Hills, Michigan
    MS-Off Ver
    2016
    Posts
    3

    Re: How to add or delete rows simultaneously in different sheets of the same worksheet

    Yes. I had the control key pressed and I selected all of my 3 sheets and grouped them.
    I realized that there is an offset between the row I'm deleting in sheet 1 and the row that has to be deleted in sheet 2 and 3 so grouping is not helping.
    Ex. I want to delete row 17 in sheet 1. When I delete row 17 in sheet 1, I want to have row 20 deleted in sheet 2 because row 20 in sheet 2 corresponds to row 17 in sheet 1.
    I think I may need a macro for that. Please help.

  6. #6
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: How to add or delete rows simultaneously in different sheets of the same worksheet

    Attach a sample workbook and tell us which rows on one sheet "map" to which rows on another sheet. E.G. If I delete a row on Sheet 1 I want the same row only three rows down to be deleted on Sheet 2.

    The trick will be finding an appropriate "trigger" to make the event happen.

    Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

+ 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. [SOLVED] Delete all charts and empty rows from all sheets; won't change sheets
    By astrbac in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-29-2015, 10:12 AM
  2. Delete & Hide Rows in a Worksheet based on the Value of a Cell in another Worksheet
    By lhickerson in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-12-2014, 09:53 AM
  3. Replies: 0
    Last Post: 10-28-2013, 04:08 AM
  4. Hiding rows in all sheets simultaneously
    By marcelonakamura in forum Excel General
    Replies: 1
    Last Post: 08-31-2011, 02:33 PM
  5. Delete Rows by Cell Value - Delete sheets w/out prompt
    By Jimmydageek in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-25-2010, 02:03 PM
  6. Replies: 5
    Last Post: 12-12-2008, 10:34 AM
  7. Replies: 1
    Last Post: 08-09-2006, 12:51 PM

Tags for this Thread

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