How do I delete the same row in a multisheet spreadsheet

  • Thread starter Thread starter John M.Lees
  • Start date Start date
J

John M.Lees

How do achieve the above please?
I am using a complicated multi sheet spreadsheet which reads from the first
sheet which comprises of fixed data.
I want to delete data row by row from the data sheet,which will then delete
corresponding rows from each following sheet.
Thank you
 
John

Maybe this. right click your 'data' sheet tab, view code and paste this in
and run it. Enter the row number to delete. I suggest you test this on a
non-critical workbook.

Sub DeleteIt()
Dim ws As Worksheet
response = InputBox("Enter row number to delete", vbOKCancel)
If response = "" Then Exit Sub
For x = 1 To Worksheets.Count
Sheets(x).Rows(response).EntireRow.Delete
Next
End Sub
 
Do you mean that if you delete row 4 in one sheet row 4 should be deleted in
all the sheets

If you group the sheets before you do this they all will be deleted

(click first tab, hold down shift and click last tab.

Don't forget to ungroup the sheets when you are done

--


Regards,


Peo Sjoblom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top