When I delete a row from sheet A I want the same row be deleted in sheet B

odiseus

New Member
Joined
Aug 2, 2012
Messages
6
I have a workbook with 10 sheets. When I delete one row (any row - each time i choose which one to delete) in sheet A I would like the same row to be automatically deleted from sheet B. How can this be done?
TIA
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
If you are on sheet A, then hold shift and click on sheet B to select both sheets. Then delete the row you want to be gone and it will do it on both sheets.
 
Upvote 0
If you are on sheet A, then hold shift and click on sheet B to select both sheets. Then delete the row you want to be gone and it will do it on both sheets.

Thanks! That does it. I will try to transform this into a macro.
 
Upvote 0
How about this?

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim r As Range
Set r = Selection
If Selection.Columns.Count = ActiveSheet.Columns.Count Then
    Dim ws As Worksheet
        For Each ws In ActiveWorkbook.Worksheets
            If ws.Name <> "Sheet1" Then
                ws.Range(r.Address).EntireRow.Delete
            End If
        Next ws
End If
        
End Sub

substitute sheet1 for sheeta or whatever your main sheet is named.
 
Upvote 0
Thanks much again!
I am much less sophisticated...

Code:

Sub Macro1()
'
' Macro1 Macro
'
' Keyboard Shortcut: Ctrl+g
'
Sheets(Array("A", "B")).Select
Sheets("A").Activate
ActiveCell.EntireRow.Select
Selection.Delete
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,373
Messages
6,124,559
Members
449,171
Latest member
jominadeo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top